rthomasv3 / Scum-Bag

Scum Bag is an all-in-one save manager for all your characters and games.
5 stars 2 forks source link

Max backups not working #5

Closed PinkingGiovanna closed 6 months ago

PinkingGiovanna commented 6 months ago

This might be happening because I'm backing up way too many save files (141)

rthomasv3 commented 6 months ago

Have you marked any backups as favorites? They don't count toward the max number.

Any more details you can provide would be really helpful - any errors in the logs ("%appdata%\Scum Bag\logs.txt"), what game, how many backups you set as the max, how many you are seeing it create, settings, etc.

PinkingGiovanna commented 6 months ago

logs.txt I haven't marked any backups as favorites, I also am saving some save files that aren't from games; I tried to use 3 max backups, 1 max backup but it doesn't work and doesn't delete the old ones.

rthomasv3 commented 6 months ago

According to the logs, some other program is locking the files and not allowing Scum Bag to access them. This is likely a bug in whatever software you're using alongside Scum Bag, and probably can't be fixed on my side. I'll still look into it further though, because it could be that Scum Bag is the one locking the files elsewhere in the code - so I'll double-check everything.

An explanation of the logs is below.

This log shows an error when checking for changes to a file to see if a backup even needs to happen:

[Error]: BackupService>GetHash - System.IO.IOException: The process cannot access the file '.. AppData\Roaming\Achievement Watcher\logs\websocket.log' because it is being used by another process.

This logs shows an error when trying to delete old backups and stay within the limit:

[Error]: BackupService>CreateBackup - System.IO.IOException: Access to the path '.. AppData\Roaming\Scum Bag\03e8bef5-b789-485c-9634-1dc5d0eebf27\638503676579621143\blob_storage\1b278716-1563-46b8-802d-af7e132c2747' is denied.
   at System.IO.FileSystem.RemoveDirectoryRecursive(String fullPath, WIN32_FIND_DATA& findData, Boolean topLevel)
PinkingGiovanna commented 6 months ago

Ok, I am using Google Drive to backup the files to it automatically, so it might be because of that. Thanks for the help

PinkingGiovanna commented 6 months ago

I was also trying to change the the Backup Directory but it doesn't seem to work. Don't know if it's releated to the same issue as before or if it's something else.

rthomasv3 commented 6 months ago

Yeah that's probably the same issue. When you change the backup directory it tries to move all the files to the new location, and if google drive locks them, then it would fail with similar errors to the above.

PinkingGiovanna commented 6 months ago

So, I disabled Google Drive and the Max backups seem to be working again, but changing the backup directory still doesn't work, it sometimes moves the content of one directory to the other directory I want but doesn't change the path in the program.

PinkingGiovanna commented 6 months ago

I don't know why but even with Drive backup disabled, while playing Elden Ring the max backups still don't work

rthomasv3 commented 6 months ago

I'm going to take another look at this over the weekend and see what I can do.

rthomasv3 commented 6 months ago

This should be resolved as of v1.1.5. If not, then there's some other program on your system that's locking the file.