[FirstRun > win32] Clean up source a bit
This commit is contained in:
parent
ec5f9b4449
commit
7d00ef5082
1 changed files with 22 additions and 23 deletions
|
@ -23,6 +23,7 @@ const copyIconToRoot = () => {
|
|||
};
|
||||
|
||||
const updateShortcuts = (updater) => {
|
||||
try {
|
||||
const filename = Constants.APP_NAME_FOR_HUMANS + '.lnk';
|
||||
|
||||
const icon_path = copyIconToRoot();
|
||||
|
@ -46,6 +47,9 @@ const updateShortcuts = (updater) => {
|
|||
}
|
||||
|
||||
return true;
|
||||
} catch (e) {
|
||||
log('FirstRun', 'Shortcuts error', e);
|
||||
}
|
||||
};
|
||||
|
||||
exports.performFirstRunTasks = (updater) => {
|
||||
|
@ -54,12 +58,7 @@ exports.performFirstRunTasks = (updater) => {
|
|||
const flagPath = join(paths.getUserDataVersioned(), '.first-run');
|
||||
if (fs.existsSync(flagPath)) return; // Already done, skip
|
||||
|
||||
let shortcutSuccess = false;
|
||||
try {
|
||||
shortcutSuccess = updateShortcuts(updater);
|
||||
} catch (e) {
|
||||
log('FirstRun', 'Error updating shortcuts', e);
|
||||
}
|
||||
const shortcutSuccess = updateShortcuts(updater);
|
||||
|
||||
registry.installProtocol(Constants.APP_PROTOCOL, () => {
|
||||
if (!shortcutSuccess) return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue