mirror of
https://github.com/CringeStudios/element-desktop.git
synced 2025-01-31 05:29:58 +01:00
Merge pull request #123 from vector-im/dbkr/remove_bracketed_riot
Remove ' (Riot)' from app name
This commit is contained in:
commit
d49625e253
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "element-desktop",
|
||||
"productName": "Element (Riot)",
|
||||
"productName": "Element",
|
||||
"main": "src/electron-main.js",
|
||||
"version": "1.7.1",
|
||||
"description": "A feature-rich client for Matrix.org",
|
||||
|
@ -115,18 +115,16 @@ if (userDataPathInProtocol) {
|
||||
} else if (argv['profile-dir']) {
|
||||
userDataPath = argv['profile-dir'];
|
||||
} else {
|
||||
// strip the bracketed riot suffix from the app name, if any: we don't want to
|
||||
// store user data in a dir with that transitional suffix.
|
||||
const appName = app.getName().replace(' (Riot)', '');
|
||||
|
||||
// always override the user data path because electron uses the ${appData}/productName
|
||||
// but we want our productName to be "Element (Riot)" for a transition period after the rename.
|
||||
let newUserDataPath = path.join(app.getPath('appData'), appName);
|
||||
let newUserDataPath = app.getPath('userData');
|
||||
if (argv['profile']) {
|
||||
newUserDataPath += '-' + argv['profile'];
|
||||
}
|
||||
const newUserDataPathExists = isRealUserDataDir(newUserDataPath);
|
||||
const oldUserDataPath = path.join(app.getPath('appData'), appName.replace('Element', 'Riot'));
|
||||
let oldUserDataPath = path.join(app.getPath('appData'), app.getName().replace('Element', 'Riot'));
|
||||
if (argv['profile']) {
|
||||
oldUserDataPath += '-' + argv['profile'];
|
||||
}
|
||||
|
||||
const oldUserDataPathExists = isRealUserDataDir(oldUserDataPath);
|
||||
console.log(newUserDataPath + " exists: " + (newUserDataPathExists ? 'yes' : 'no'));
|
||||
console.log(oldUserDataPath + " exists: " + (oldUserDataPathExists ? 'yes' : 'no'));
|
||||
|
Loading…
x
Reference in New Issue
Block a user