Pherakki / SimpleDSCSModManager

A poorly-named mod manager for the PC release of Digimon Story: Cyber Sleuth Complete Edition.
GNU General Public License v3.0
17 stars 10 forks source link

[Bug] Backup tries to restore file that shouldn't exist #26

Open TriWolf101 opened 1 year ago

TriWolf101 commented 1 year ago

I am having problems with the program when I press on "restore backups." I never had this problem before today. I can install some of the mods just fine but just by clicking on the "restore backups" option closes the program and gives the error that says access is denied.

I did give it admin permission and took out the extra slashes, but the slashes keep coming back!

Is there a way to resolve this?

Screenshot 2023-06-13 215316

Pherakki commented 1 year ago

Hi, that's a really interesting issue. I think "Permission Denied" here is Windows saying that the path Digimon Story Cyber Sleuth Complete Edition/resources/plugins/cmake does not exist.

The fact that the mod manager seems to be looking for such a folder is unintended behaviour.

Can you please provide the following additional information:

You can restore the backups manually by going to the Digimon Story Cyber Sleuth Complete Edition/resources/backups folder created by the mod manager and copy+pasting the contents over the Digimon Story Cyber Sleuth Complete Edition/resources folder. Can you also attach a screenshot of the contents of this folder, especially if there is a plugins/cmake folder in it?

TriWolf101 commented 1 year ago

Hi, that's a really interesting issue. I think "Permission Denied" here is Windows saying that the path Digimon Story Cyber Sleuth Complete Edition/resources/plugins/cmake does not exist.

The fact that the mod manager seems to be looking for such a folder is unintended behaviour.

Can you please provide the following additional information:

  • Are you using the v0.1 release, or a build you have compiled yourself from source?
  • Do you get a logfile produced alongside the crash? They are located in the logs folder of the SDMM install. If so, please paste the contents here, redacting any information you feel necessary from the filepaths mentions (such as usernames, etc.)
  • Have you installed SydMontague's ModLoader?
  • Did you make any changes to your game install/game files/modlist/etc. between the mod manager working and this crash starting to occur?
  • Verify whether the paths Digimon Story Cyber Sleuth Complete Edition/resources/plugins and Digimon Story Cyber Sleuth Complete Edition/resources/plugins/cmake exist

You can restore the backups manually by going to the Digimon Story Cyber Sleuth Complete Edition/resources/backups folder created by the mod manager and copy+pasting the contents over the Digimon Story Cyber Sleuth Complete Edition/resources folder. Can you also attach a screenshot of the contents of this folder, especially if there is a plugins/cmake folder in it?

I was using the latest release you have on your profile, which is v0.1 and dates to April 2, 2022.

I have gotten the logfile produced from the crash, about 4 of them that say the same thing: Traceback (most recent call last): File "CoreOperations__init__.py", line 60, in uninstall_mods PermissionError: [WinError 5] Access is denied: 'C:\Program Files (x86)\Steam\steamapps\common\Digimon Story Cyber Sleuth Complete Edition\resources\plugins\cmake'

I haven't made any changes, as far as I know. I even tried to put it on the correct path but it didn't work. I also had an update for my windows system before the error happened. Not sure if that had anything to do with it, since it was working fine.

The SimpleDSCSModManager automicially found the path Digimon Story Cyber Sleuth Complete Edition/resources/plugin and I just checked the steam folder of the game itself and it didn't have a folder that said "cmake". I should probably download it, shouldn't I?

I did manage to resolve the issue, however, by doing a clean reinstall of the entire game before using SimpleDSCSModManager to reinstall the mods. It seems to work as I am now able to use "restore backups."

EDIT: The error just came back. But I now fixed it by removing the 'cmake' from Digimon Story Cyber Sleuth Complete Edition\resources\plugins\ , the plugins folder is now empty.

Pherakki commented 1 year ago

Thanks for providing the log - I managed to identify the cause of the bug immediately from that. The mod manager is trying to uninstall ModLoader plugins, and assumes everything inside the plugins folder is a file and will crash if there's any folders in there. Pretty dumb oversight on my part (although there shouldn't ever be any folders in there anyway). I'll fix it on develop when I get a moment and it'll be in the next release, whenever I manage to get the time to put that out.