diff --git a/src/main/kotlin/ca/gosyer/core/prefs/PreferenceStoreProvider.kt b/src/main/kotlin/ca/gosyer/core/prefs/PreferenceStoreProvider.kt index a90b5088..6269726b 100644 --- a/src/main/kotlin/ca/gosyer/core/prefs/PreferenceStoreProvider.kt +++ b/src/main/kotlin/ca/gosyer/core/prefs/PreferenceStoreProvider.kt @@ -11,12 +11,14 @@ import com.russhwolf.settings.JvmPreferencesSettings import java.util.prefs.Preferences class PreferenceStoreFactory { + private val rootNode: Preferences = Preferences.userRoot() + .node("ca/gosyer/tachideskjui") fun create(vararg names: String): PreferenceStore { - var preferences: Preferences = Preferences.userRoot() - names.forEach { - preferences = preferences.node(it) - } - return JvmPreferenceStore(JvmPreferencesSettings(preferences)) + return JvmPreferenceStore( + JvmPreferencesSettings( + rootNode.node(names.joinToString(separator = "/")) + ) + ) } }