From c997ab96eca98a50386bcec5bd1de79936025944 Mon Sep 17 00:00:00 2001 From: gsemaj Date: Sat, 18 Sep 2021 18:05:33 -0400 Subject: [PATCH] Fix broken calls to copySync --- index.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/index.js b/index.js index 8074f47..bd60ed7 100644 --- a/index.js +++ b/index.js @@ -19,17 +19,17 @@ function initialSetup(firstTime) { console.log("Unity installed."); if(!firstTime) { // migration from pre-1.4 // Back everything up, just in case - copySync(app.getPath('userData')+"\\config.json", app.getPath('userData')+"\\config.json.bak"); - copySync(app.getPath('userData')+"\\servers.json", app.getPath('userData')+"\\servers.json.bak"); - copySync(app.getPath('userData')+"\\versions.json", app.getPath('userData')+"\\versions.json.bak"); + fs.copySync(app.getPath('userData')+"\\config.json", app.getPath('userData')+"\\config.json.bak"); + fs.copySync(app.getPath('userData')+"\\servers.json", app.getPath('userData')+"\\servers.json.bak"); + fs.copySync(app.getPath('userData')+"\\versions.json", app.getPath('userData')+"\\versions.json.bak"); } else { // first-time setup // Copy default servers - copySync(__dirname+"\\defaults\\servers.json", app.getPath('userData')+"\\servers.json"); + fs.copySync(__dirname+"\\defaults\\servers.json", app.getPath('userData')+"\\servers.json"); } // Copy default versions and config - copySync(__dirname+"\\defaults\\versions.json", app.getPath('userData')+"\\versions.json"); - copySync(__dirname+"\\defaults\\config.json", app.getPath('userData')+"\\config.json"); + fs.copySync(__dirname+"\\defaults\\versions.json", app.getPath('userData')+"\\versions.json"); + fs.copySync(__dirname+"\\defaults\\config.json", app.getPath('userData')+"\\config.json"); console.log("JSON files copied."); setupWindow.destroy();