diff --git a/src/migrate.js b/src/migrate.js index b22a156..c13fbcc 100644 --- a/src/migrate.js +++ b/src/migrate.js @@ -24,9 +24,20 @@ function migrate() { .then(r => { utils.debug('Starting Burn-My-Windows profile migration!'); + // The default value of this is false, so if it is not present, only normal windows + // were affected. + const onlyNormalWindows = !r.includes('destroy-dialogs=true'); + if (onlyNormalWindows) { + utils.debug('Only normal windows will be burned by the new profile(s).'); + } else { + utils.debug('Normal windows and dialogs will be burned by the new profile(s).'); + } + // Remove some unnecessary lines. r = r.replace(/^active-profile=.*\n?/gm, ''); r = r.replace(/^test-mode=.*\n?/gm, ''); + r = r.replace(/^last-version=.*\n?/gm, ''); + r = r.replace(/^destroy-dialogs=.*\n?/gm, ''); r = r.replace(/^.*-preview-.*\n?/gm, ''); r = r.replace('[/]\n', ''); @@ -66,15 +77,6 @@ function migrate() { utils.debug('Two profiles are required.'); } - // The default value of this is false, so if it is not present, only normal windows - // were affected. - const onlyNormalWindows = !r.includes('destroy-dialogs=true'); - if (onlyNormalWindows) { - utils.debug('Only normal windows will be burned by the new profile(s).'); - } else { - utils.debug('Normal windows and dialogs will be burned by the new profile(s).'); - } - const profile = lines.filter(l => !l.includes('-close-effect=') && !l.includes('-open-effect=')); profile.unshift('[burn-my-windows-profile]');