diff --git a/app/scripts/models/runtime-data-model.js b/app/scripts/models/runtime-data-model.js index 6b929e0e..d39d64cb 100644 --- a/app/scripts/models/runtime-data-model.js +++ b/app/scripts/models/runtime-data-model.js @@ -10,10 +10,6 @@ class RuntimeDataModel extends Model { load() { return SettingsStore.load('runtime-data').then(data => { if (data) { - if (data.cookies) { - // we're not using cookies here now - delete data.cookies; - } this.set(data, { silent: true }); } }); diff --git a/desktop/app.js b/desktop/app.js index 3a03fb38..3ae0438c 100644 --- a/desktop/app.js +++ b/desktop/app.js @@ -56,7 +56,6 @@ perfTimestamps?.push({ name: 'defining args', ts: process.hrtime() }); setDevAppIcon(); setEnv(); -restorePreferences(); const appSettings = readAppSettings() || {}; @@ -489,39 +488,6 @@ function setEnv() { perfTimestamps?.push({ name: 'setting env', ts: process.hrtime() }); } -function restorePreferences() { - const profileConfigPath = path.join(userDataDir, 'profile.json'); - - const newProfile = { dir: tempUserDataPathRand }; - let oldProfile; - try { - oldProfile = JSON.parse(fs.readFileSync(profileConfigPath, 'utf8')); - } catch (e) {} - - fs.writeFileSync(profileConfigPath, JSON.stringify(newProfile)); - - if (oldProfile && oldProfile.dir && /^[\d.]+$/.test(oldProfile.dir)) { - const oldProfilePath = path.join(tempUserDataPath, oldProfile.dir); - const newProfilePath = path.join(tempUserDataPath, newProfile.dir); - if (fs.existsSync(path.join(oldProfilePath, 'Cookies'))) { - if (!fs.existsSync(newProfilePath)) { - fs.mkdirSync(newProfilePath); - } - const cookiesFileSrc = path.join(oldProfilePath, 'Cookies'); - const cookiesFileDest = path.join(newProfilePath, 'Cookies'); - try { - fs.renameSync(cookiesFileSrc, cookiesFileDest); - } catch (e) { - try { - fs.copyFileSync(cookiesFileSrc, cookiesFileDest); - } catch (e) {} - } - } - } - - perfTimestamps?.push({ name: 'restoring preferences', ts: process.hrtime() }); -} - function deleteOldTempFiles() { if (app.oldTempFilesDeleted) { return;