[FirstRun > win32] Clean up source a bit

This commit is contained in:
Ducko 2022-03-14 09:33:27 +00:00
parent ec5f9b4449
commit 7d00ef5082

View file

@ -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;