Skip to content

Commit f38b53a

Browse files
author
Jia Liu
committed
fix: fix the wrong path of prompt templete file path
1 parent e79a8b7 commit f38b53a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/kotlin/cc/unitmesh/devti/template/TemplateRender.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,9 @@ class TemplateRender(private val pathPrefix: String) {
7373
}
7474

7575
private fun getDefaultFilePath(filename: String): String {
76-
val languagePrefix = "$ROOT/${AutoDevSettingsState.language}/$pathPrefix".trimEnd('/')
76+
val languagePrefix = "$ROOT/${AutoDevSettingsState.language}$pathPrefix".trimEnd('/')
7777
val path = "$languagePrefix/$filename"
78-
if (File(path).exists()) {
78+
if (javaClass.classLoader.getResource(path) != null) {
7979
return path
8080
}
8181

0 commit comments

Comments
 (0)