-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Desktop: Resolves #9857: Back up to a subdirectory of the home direct…
…ory by default
- Loading branch information
1 parent
4b52022
commit 2e7b466
Showing
12 changed files
with
267 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { homedir } from 'os'; | ||
import { toSystemSlashes } from './path-utils'; | ||
|
||
export default (profileFromArgs: string, appName: string) => { | ||
let profileDir = ''; | ||
let homeDir = ''; | ||
|
||
if (profileFromArgs) { | ||
profileDir = profileFromArgs; | ||
homeDir = profileDir; | ||
} else if (process && process.env && process.env.PORTABLE_EXECUTABLE_DIR) { | ||
profileDir = `${process.env.PORTABLE_EXECUTABLE_DIR}/JoplinProfile`; | ||
homeDir = process.env.PORTABLE_EXECUTABLE_DIR; | ||
} else { | ||
profileDir = `${homedir()}/.config/${appName}`; | ||
homeDir = homedir(); | ||
} | ||
|
||
return { | ||
rootProfileDir: toSystemSlashes(profileDir, 'linux'), | ||
homeDir: toSystemSlashes(homeDir, 'linux'), | ||
}; | ||
}; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.