Skip to content

Commit

Permalink
fix bug where first boost would fail
Browse files Browse the repository at this point in the history
settings could not be transferred if old Slippi Launcher folder didn't exist (duh)
  • Loading branch information
JLaferri committed Apr 9, 2019
1 parent 47b5b95 commit 4de9df1
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 10 deletions.
22 changes: 13 additions & 9 deletions app/main.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,15 +59,19 @@ if (isProd && !prevVersion) {

log.info("Transferring settings from previous Slippi Launcher install...");

const oldSettingPath = path.join(oldAppDataPath, "Settings");
const newSettingsPath = path.join(newAppDataPath, "Settings");
fs.copyFileSync(oldSettingPath, newSettingsPath);

const oldDolphinUserPath = path.join(oldAppDataPath, "dolphin", "User");
const newDolphinUserPath = path.join(newAppDataPath, "dolphin", "User");
fs.copySync(oldDolphinUserPath, newDolphinUserPath, { overwrite: true });

log.info("Done transferring settings.");
try {
const oldSettingPath = path.join(oldAppDataPath, "Settings");
const newSettingsPath = path.join(newAppDataPath, "Settings");
fs.copyFileSync(oldSettingPath, newSettingsPath);

const oldDolphinUserPath = path.join(oldAppDataPath, "dolphin", "User");
const newDolphinUserPath = path.join(newAppDataPath, "dolphin", "User");
fs.copySync(oldDolphinUserPath, newDolphinUserPath, { overwrite: true });

log.info("Done transferring settings.");
} catch (err) {
log.warn("Failed to transfer settings. Maybe old version didn't exist?");
}
}

const platform = process.platform;
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "slippi-desktop-app",
"productName": "Slippi Desktop App",
"version": "1.4.2",
"version": "1.4.3",
"description": "Slippi Desktop App for browsing and playing replays.",
"scripts": {
"build": "concurrently \"yarn build-main\" \"yarn build-renderer\"",
Expand Down

0 comments on commit 4de9df1

Please sign in to comment.