LMH01 / MGT2_Mod_Tool

This is a tool with which you can modify Mad Games Tycoon 2. You can for example add or remove genres.
GNU Affero General Public License v3.0
13 stars 3 forks source link

Restore initial backup fails on CompanyLogo #123

Closed luanalatte closed 1 year ago

luanalatte commented 1 year ago

(4.9.0-beta2)

I have renamed all original publishers + added one. Restoring the initial backup throws an error, you can click ok and it retries and succeeds. Probably not a major bug.

2023-FEBRUARY-28-9-16-33: Error removing content of type publisher; Stacktrace:
2023-FEBRUARY-28-9-16-33: com.github.lmh01.mgt2mt.content.managed.ModProcessingException: Unable to remove contents of typepublisher
    at com.github.lmh01.mgt2mt.content.managed.AbstractBaseContentManager.removeContents(AbstractBaseContentManager.java:230)
    at com.github.lmh01.mgt2mt.util.Uninstaller.uninstallAllMods(Uninstaller.java:190)
    at com.github.lmh01.mgt2mt.util.Backup.restoreInitialBackup(Backup.java:498)
    at com.github.lmh01.mgt2mt.util.handler.ThreadHandler.lambda$startModThread$3(ThreadHandler.java:144)
    at java.lang.Thread.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
Caused by: com.github.lmh01.mgt2mt.content.managed.ModProcessingException: Unable to remove image files for Accolade
    at com.github.lmh01.mgt2mt.content.managed.AbstractBaseContentManager.removeContents(AbstractBaseContentManager.java:220)
    ... 5 more
Caused by: java.nio.file.NoSuchFileException: D:\SteamLibrary\steamapps\common\Mad Games Tycoon 2\Mad Games Tycoon 2_Data\Extern\CompanyLogos\203.png
    at sun.nio.fs.WindowsException.translateToIOException(Unknown Source)
    at sun.nio.fs.WindowsException.rethrowAsIOException(Unknown Source)
    at sun.nio.fs.WindowsException.rethrowAsIOException(Unknown Source)
    at sun.nio.fs.WindowsFileSystemProvider.implDelete(Unknown Source)
    at sun.nio.fs.AbstractFileSystemProvider.delete(Unknown Source)
    at java.nio.file.Files.delete(Unknown Source)
    at com.github.lmh01.mgt2mt.content.instances.Publisher.removePictures(Publisher.java:128)
    at com.github.lmh01.mgt2mt.content.managed.AbstractBaseContentManager.removeContents(AbstractBaseContentManager.java:218)
    ... 5 more

2023-FEBRUARY-28-9-16-33: Game files have been restored to original. Duration: 3.25 seconds!
2023-FEBRUARY-28-9-16-33: Restoring backup
2023-FEBRUARY-28-9-16-34: Copying directory: C:\Users\Luana\AppData\Roaming\LMH01\MGT2_Mod_Manager\beta\backup\pictures\CompanyLogos -> D:\SteamLibrary\steamapps\common\Mad Games Tycoon 2\Mad Games Tycoon 2_Data\Extern\CompanyLogos
2023-FEBRUARY-28-9-16-35: Copying directory: C:\Users\Luana\AppData\Roaming\LMH01\MGT2_Mod_Manager\beta\backup\pictures\Icons_Genres -> D:\SteamLibrary\steamapps\common\Mad Games Tycoon 2\Mad Games Tycoon 2_Data\Extern\Icons_Genres
2023-FEBRUARY-28-9-16-35: Copying directory: C:\Users\Luana\AppData\Roaming\LMH01\MGT2_Mod_Manager\beta\backup\pictures\Icons_Hardware -> D:\SteamLibrary\steamapps\common\Mad Games Tycoon 2\Mad Games Tycoon 2_Data\Extern\Icons_Hardware
2023-FEBRUARY-28-9-16-35: Copying directory: C:\Users\Luana\AppData\Roaming\LMH01\MGT2_Mod_Manager\beta\backup\pictures\Icons_Platforms -> D:\SteamLibrary\steamapps\common\Mad Games Tycoon 2\Mad Games Tycoon 2_Data\Extern\Icons_Platforms
2023-FEBRUARY-28-9-16-35: Copying directory: C:\Users\Luana\AppData\Roaming\LMH01\MGT2_Mod_Manager\beta\backup\pictures\Screenshots -> D:\SteamLibrary\steamapps\common\Mad Games Tycoon 2\Mad Games Tycoon 2_Data\Extern\Screenshots
2023-FEBRUARY-28-9-16-37: The initial backup has been restored.
2023-FEBRUARY-28-9-16-43: Restoring backup
2023-FEBRUARY-28-9-16-46: Copying directory: C:\Users\Luana\AppData\Roaming\LMH01\MGT2_Mod_Manager\beta\backup\pictures\CompanyLogos -> D:\SteamLibrary\steamapps\common\Mad Games Tycoon 2\Mad Games Tycoon 2_Data\Extern\CompanyLogos
2023-FEBRUARY-28-9-16-48: Copying directory: C:\Users\Luana\AppData\Roaming\LMH01\MGT2_Mod_Manager\beta\backup\pictures\Icons_Genres -> D:\SteamLibrary\steamapps\common\Mad Games Tycoon 2\Mad Games Tycoon 2_Data\Extern\Icons_Genres
2023-FEBRUARY-28-9-16-48: Copying directory: C:\Users\Luana\AppData\Roaming\LMH01\MGT2_Mod_Manager\beta\backup\pictures\Icons_Hardware -> D:\SteamLibrary\steamapps\common\Mad Games Tycoon 2\Mad Games Tycoon 2_Data\Extern\Icons_Hardware
2023-FEBRUARY-28-9-16-48: Copying directory: C:\Users\Luana\AppData\Roaming\LMH01\MGT2_Mod_Manager\beta\backup\pictures\Icons_Platforms -> D:\SteamLibrary\steamapps\common\Mad Games Tycoon 2\Mad Games Tycoon 2_Data\Extern\Icons_Platforms
2023-FEBRUARY-28-9-16-49: Copying directory: C:\Users\Luana\AppData\Roaming\LMH01\MGT2_Mod_Manager\beta\backup\pictures\Screenshots -> D:\SteamLibrary\steamapps\common\Mad Games Tycoon 2\Mad Games Tycoon 2_Data\Extern\Screenshots
2023-FEBRUARY-28-9-16-51: The initial backup has been restored.
LMH01 commented 1 year ago

I don't know where the issue is and I don't see the need to fix it now because it only happens when the initial backup is restored. I will however add a message to the TextArea that explains that FileNotFoundExceptions can be ignored. Closing as wontfix.