Fix portable directory path (#1403)

This commit is contained in:
Felix Häusler 2019-09-30 15:40:18 +02:00 committed by GitHub
parent c0e141053c
commit a68fb82eb3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -52,7 +52,7 @@ const cli = () => {
// Check for portable mode and ensure the user data path is absolute. We assume
// that the path is writable if not this lead to an application crash.
if (!args['--user-data-dir']) {
const portablePath = path.join(app.getAppPath(), 'marktext-user-data')
const portablePath = path.join(app.getAppPath(), '..', '..', 'marktext-user-data')
if (isDirectory(portablePath)) {
args['--user-data-dir'] = portablePath
}