Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Symlinks] Sometimes backups are not moved #4

Closed
SoyRA opened this issue Jul 18, 2021 · 1 comment
Closed

[Symlinks] Sometimes backups are not moved #4

SoyRA opened this issue Jul 18, 2021 · 1 comment
Labels
🐛 Bug Issues marked with this label indicate unintended program behaviour that needs correction. ✔️ Confirmed Issues marked with this label were acknowledged and confirmed by the developer.

Comments

@SoyRA
Copy link
Owner

SoyRA commented Jul 18, 2021

Bug report

Describe the bug

Despite having Ayria\PNL\GameCodename, sometimes it doesn't move to the current directory.

To Reproduce

  1. Generate the .ini, close the Launcher, edit it so it already has everything I want, etc.
  2. Select IW5 -> Play SP -> Edit something -> Exit the game.
  3. Select IW6 -> Play SP -> Edit something -> Exit the game.
  4. Select S1 -> Play SP -> Edit something -> Exit the game.
  5. Select IW5 -> The Backup has not been restored. ❌
  6. Select IW6 -> Backup has been restored. ✔️
  7. Select S1 -> The Backup has not been restored. ❌

Expected behavior

If I've a Backup, it should move to the current directory without problems.

@SoyRA SoyRA added 🐛 Bug Issues marked with this label indicate unintended program behaviour that needs correction. ✔️ Confirmed Issues marked with this label were acknowledged and confirmed by the developer. labels Jul 18, 2021
@SoyRA
Copy link
Owner Author

SoyRA commented Jul 20, 2021

Note for when I've time to return.

  1. ExclArray() list everything that ExclFlr has (except Ayria): [admin, main\demo, main\recipes, main\save, players, players2]
  2. getFlr() compares that with the current directory: [] if there is nothing and [players2] if there is something.
  3. In the order of things, it will never be able to "restore the backup". In IW6 it did because IW5 wasn't executed (no players2 generated).

if (!chckSymlink.isEmpty() && !getFlr().isEmpty()) {
moveFiles(0, old);
if (cur.equals("H1")) {
H1PrtlUpd();
}
chckPost();
} else {
moveFiles(1, cur);
if (cur.equals("H1")) {
H1PrtlUpd();
}
chckPost();
}

@SoyRA SoyRA closed this as completed in e630a63 Jul 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 Bug Issues marked with this label indicate unintended program behaviour that needs correction. ✔️ Confirmed Issues marked with this label were acknowledged and confirmed by the developer.
Projects
None yet
Development

No branches or pull requests

1 participant