File tree Expand file tree Collapse file tree
app/src/main/kotlin/com/spoiligaming/explorer
settings/src/main/kotlin/com/spoiligaming/explorer/settings/util Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ internal object StartupAppDataMigration {
3737 )
3838
3939 fun migrateBeforeLogging (): File {
40- if (AppStoragePaths .isPortableWindows ) {
40+ if (AppStoragePaths .isPortableInstall ) {
4141 return AppStoragePaths .logsDir
4242 }
4343
Original file line number Diff line number Diff line change @@ -31,7 +31,10 @@ object AppStoragePaths {
3131 private val osName = System .getProperty(" os.name" )?.lowercase().orEmpty()
3232 private val isMac = osName.contains(" mac" )
3333 private val isWindows = osName.contains(" win" )
34- val isPortableWindows = isWindows && BuildConfig .DISTRIBUTION .contains(" portable" , ignoreCase = true )
34+
35+ private val isPortableDistribution = BuildConfig .DISTRIBUTION .contains(" portable" , ignoreCase = true )
36+ private val isJarDistribution = BuildConfig .DISTRIBUTION .contains(" jar" , ignoreCase = true )
37+ val isPortableInstall = isPortableDistribution || isJarDistribution
3538
3639 val preferredAppDirName =
3740 if (isWindows || isMac) {
@@ -104,9 +107,9 @@ object AppStoragePaths {
104107
105108 val platformLogsDir = platformLogsRootDir.resolve(LOGS_DIR_NAME )
106109
107- val settingsDir = if (isPortableWindows ) legacyConfigDir else platformSettingsDir
110+ val settingsDir = if (isPortableInstall ) legacyConfigDir else platformSettingsDir
108111
109- val firstRunConfigDir = if (isPortableWindows ) legacyConfigDir else platformConfigRootDir
112+ val firstRunConfigDir = if (isPortableInstall ) legacyConfigDir else platformConfigRootDir
110113
111- val logsDir = if (isPortableWindows ) legacyLogsDir else platformLogsDir
114+ val logsDir = if (isPortableInstall ) legacyLogsDir else platformLogsDir
112115}
You can’t perform that action at this time.
0 commit comments