SoyRA / PNLauncher

A simple 3rd-party ProjectNova launcher written in Java
GNU General Public License v3.0
3 stars 0 forks source link

[Symlinks] Sometimes backups are not moved #4

Closed SoyRA closed 3 years ago

SoyRA commented 3 years ago

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 commented 3 years ago

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).

https://github.com/SoyRA/PNLauncher/blob/4032bf4b1b050b57ee4bf1ecb972577223d8d16e/PNLauncher/src/symlink.java#L120-L132