mirror of
https://github.com/CringeStudios/element-desktop.git
synced 2025-01-18 23:44:59 +01:00
Remove the Element (Riot) shortcuts too
This commit is contained in:
parent
a4cbe3acab
commit
c6ab88508f
@ -51,6 +51,19 @@ function checkSquirrelHooks() {
|
||||
appDataDir, 'Microsoft', 'Windows', 'Start Menu', 'Programs', 'New Vector Ltd',
|
||||
);
|
||||
return fsProm.rmdir(startMenuDir, { recursive: true });
|
||||
}).then(() => {
|
||||
// same for 'Element (Riot) which is old now too (we have to try to delete both because
|
||||
// we don't know what version we're updating from, but of course we do know this version
|
||||
// is 'Element' so the two old ones are all safe to delete).
|
||||
const appDataDir = process.env.APPDATA;
|
||||
if (!appDataDir) return;
|
||||
const oldStartMenuLink = path.join(
|
||||
appDataDir, 'Microsoft', 'Windows', 'Start Menu', 'Programs', 'Element', 'Element (Riot).lnk',
|
||||
);
|
||||
return fsProm.unlink(oldStartMenuLink).catch(() => {});
|
||||
}).then(() => {
|
||||
const oldDesktopShortcut = path.join(app.getPath('desktop'), 'Element (Riot).lnk');
|
||||
return fsProm.unlink(oldDesktopShortcut).catch(() => {});
|
||||
}).then(() => {
|
||||
const oldDesktopShortcut = path.join(app.getPath('desktop'), 'Riot.lnk');
|
||||
return fsProm.unlink(oldDesktopShortcut).catch(() => {});
|
||||
|
Loading…
Reference in New Issue
Block a user