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 b19f6cf commit 1e0a14dCopy full SHA for 1e0a14d
src/main/kotlin/app/utils/FileHelper.kt
@@ -47,9 +47,8 @@ object FileHelper {
47
}
48
49
fun getJarPath(): Path {
50
- val fullPathString = URLDecoder.decode(FileHelper::class.java
51
- .protectionDomain.codeSource.location.toURI().path, "UTF-8")
52
- val fullPath = Paths.get(fullPathString)
+ val fullPathURI = FileHelper::class.java.protectionDomain.codeSource.location.toURI()
+ val fullPath = Paths.get(fullPathURI)
53
val root = fullPath.root
54
// Removing jar filename.
55
return root.resolve(fullPath.subpath(0, fullPath.nameCount - 1))
0 commit comments