We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent be99664 commit 6276993Copy full SHA for 6276993
utbot-python/src/main/kotlin/org/utbot/python/framework/codegen/utils/StringUtils.kt
@@ -4,5 +4,9 @@ import java.nio.file.FileSystems
4
5
6
fun String.toRelativeRawPath(): String {
7
- return "os.path.dirname(__file__) + r'${FileSystems.getDefault().separator}${this}'"
+ val dirname = "os.path.dirname(__file__)"
8
+ if (this.isEmpty()) {
9
+ return dirname
10
+ }
11
+ return "$dirname + r'${FileSystems.getDefault().separator}${this}'"
12
}
0 commit comments