Skip to content

Commit 46125fb

Browse files
committed
! Fix for portable version
1 parent 6e15fff commit 46125fb

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/main/userDataFolder.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@ import {
77
} from '../constants'
88

99
const DEFAULT_USER_DATA_PATH = app.getPath('userData')
10-
const APP_FOLDER_PATH = path.dirname(process.execPath)
10+
// For portable version (single executable) the config should be stored next to that executable file
11+
// Otherwise use the folder of many files (with `FreeTube.exe` in it)
12+
const APP_FOLDER_PATH = process.env.PORTABLE_EXECUTABLE_DIR ?? path.dirname(process.execPath)
1113
const APP_FOLDER_USER_DATA_PATH = path.join(APP_FOLDER_PATH, 'userData')
1214
const USER_DATA_IN_APP_FOLDER_SWITCH_FILE_PATH = path.join(APP_FOLDER_PATH, STORE_USER_DATA_IN_APP_FOLDER_SWITCH_FILENAME)
1315
const TO_BE_MIGRATED_FILES = [

0 commit comments

Comments
 (0)