Skip to content

Commit c58d364

Browse files
Moved settings file to user.home directory
1 parent 1205f48 commit c58d364

File tree

1 file changed

+2
-4
lines changed
  • Demos/Compose/src/main/kotlin/com/groupdocs/ui/common

1 file changed

+2
-4
lines changed

Demos/Compose/src/main/kotlin/com/groupdocs/ui/common/Settings.kt

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class Settings private constructor(val path: Path) {
2020
}
2121

2222
var licensePath: String?
23-
get() = properties.getProperty("licensePath").ifBlank { null }
23+
get() = properties.getProperty("licensePath")?.ifBlank { null }
2424
set(value) {
2525
properties.setProperty("licensePath", if (value.isNullOrBlank()) "" else value)
2626
}
@@ -58,9 +58,7 @@ class Settings private constructor(val path: Path) {
5858

5959
companion object {
6060

61-
private val settingsPath: Path =
62-
Paths.get(File(SettingsViewModel::class.java.protectionDomain.codeSource.location.toURI()).path)
63-
.parent.resolve("settings.properties")
61+
private val settingsPath: Path = Paths.get(System.getProperty("user.home")).resolve("groupdocs-comparison-compose.properties")
6462
private var _instance: Settings? = null
6563

6664
val instance: Settings

0 commit comments

Comments
 (0)