mirror of
https://github.com/OpenFusionProject/Client.git
synced 2024-11-14 02:30:05 +00:00
Fix broken calls to copySync
This commit is contained in:
parent
17ca1f3c24
commit
c997ab96ec
12
index.js
12
index.js
@ -19,17 +19,17 @@ function initialSetup(firstTime) {
|
|||||||
console.log("Unity installed.");
|
console.log("Unity installed.");
|
||||||
if(!firstTime) { // migration from pre-1.4
|
if(!firstTime) { // migration from pre-1.4
|
||||||
// Back everything up, just in case
|
// Back everything up, just in case
|
||||||
copySync(app.getPath('userData')+"\\config.json", app.getPath('userData')+"\\config.json.bak");
|
fs.copySync(app.getPath('userData')+"\\config.json", app.getPath('userData')+"\\config.json.bak");
|
||||||
copySync(app.getPath('userData')+"\\servers.json", app.getPath('userData')+"\\servers.json.bak");
|
fs.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')+"\\versions.json", app.getPath('userData')+"\\versions.json.bak");
|
||||||
} else { // first-time setup
|
} else { // first-time setup
|
||||||
// Copy default servers
|
// 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
|
// Copy default versions and config
|
||||||
copySync(__dirname+"\\defaults\\versions.json", app.getPath('userData')+"\\versions.json");
|
fs.copySync(__dirname+"\\defaults\\versions.json", app.getPath('userData')+"\\versions.json");
|
||||||
copySync(__dirname+"\\defaults\\config.json", app.getPath('userData')+"\\config.json");
|
fs.copySync(__dirname+"\\defaults\\config.json", app.getPath('userData')+"\\config.json");
|
||||||
|
|
||||||
console.log("JSON files copied.");
|
console.log("JSON files copied.");
|
||||||
setupWindow.destroy();
|
setupWindow.destroy();
|
||||||
|
Loading…
Reference in New Issue
Block a user