提交 0d0fea0f 编写于 作者: B Benjamin Pasero

Migrated autoSaveDelay formatting issues (fixes #1949)

上级 443a902d
...@@ -356,9 +356,7 @@ export class WindowsManager { ...@@ -356,9 +356,7 @@ export class WindowsManager {
// We found a closing '}' and the JSON does not contain errors // We found a closing '}' and the JSON does not contain errors
if (lastClosing > 0 && !errors.length) { if (lastClosing > 0 && !errors.length) {
const hasOtherKeys = Object.getOwnPropertyNames(res).length > 0; const migratedSettings = settingsRaw.substring(0, lastClosing) + '\n , // Migrated from previous File | Auto Save setting:\n "files.autoSaveDelay": 1\n}';
const migratedSettings = settingsRaw.substring(0, lastClosing) + '\n // Migrated from previous File | Auto Save setting:\n' + (hasOtherKeys ? ' , "files.autoSaveDelay": 1\n' : ' "files.autoSaveDelay": 1\n') + '}';
fs.writeFileSync(env.appSettingsPath, migratedSettings); fs.writeFileSync(env.appSettingsPath, migratedSettings);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册