mirror of
https://github.com/vector-im/element-desktop.git
synced 2024-09-09 22:05:10 +00:00
Fix lint error
This commit is contained in:
parent
c2cfed72df
commit
5f01bbd9e0
1 changed files with 7 additions and 6 deletions
|
@ -99,6 +99,13 @@ if (argv["help"]) {
|
||||||
app.exit();
|
app.exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Electron creates the user data directory (with just an empty 'Dictionaries' directory...)
|
||||||
|
// as soon as the app path is set, so pick a random path in it that must exist if it's a
|
||||||
|
// real user data directory.
|
||||||
|
function isRealUserDataDir(d) {
|
||||||
|
return fs.existsSync(path.join(d, 'IndexedDB'));
|
||||||
|
}
|
||||||
|
|
||||||
// check if we are passed a profile in the SSO callback url
|
// check if we are passed a profile in the SSO callback url
|
||||||
let userDataPath;
|
let userDataPath;
|
||||||
|
|
||||||
|
@ -114,12 +121,6 @@ if (userDataPathInProtocol) {
|
||||||
if (argv['profile']) {
|
if (argv['profile']) {
|
||||||
newUserDataPath += '-' + argv['profile'];
|
newUserDataPath += '-' + argv['profile'];
|
||||||
}
|
}
|
||||||
// Electron creates the user data directory (with just an empty 'Dictionaries' directory...)
|
|
||||||
// as soon as the app path is set, so pick a random path in it that must exist if it's a
|
|
||||||
// real user data directory.
|
|
||||||
function isRealUserDataDir(d) {
|
|
||||||
return fs.existsSync(path.join(d, 'IndexedDB'));
|
|
||||||
}
|
|
||||||
const newUserDataPathExists = isRealUserDataDir(newUserDataPath);
|
const newUserDataPathExists = isRealUserDataDir(newUserDataPath);
|
||||||
const oldUserDataPath = path.join(app.getPath('appData'), 'Riot');
|
const oldUserDataPath = path.join(app.getPath('appData'), 'Riot');
|
||||||
const oldUserDataPathExists = isRealUserDataDir(oldUserDataPath);
|
const oldUserDataPathExists = isRealUserDataDir(oldUserDataPath);
|
||||||
|
|
Loading…
Reference in a new issue