JKSV icon indicating copy to clipboard operation
JKSV copied to clipboard

(Enhancement) Lock save folders from being overwritten

Open micah686 opened this issue 3 years ago • 5 comments

It would be nice if we could "lock" the save files that we have dumped from being overwritten. So if there is like a save dump that you made after completing a hard mission or whatever, you could "lock" it, so that JKSV would not even give the option of overwriting it.

Maybe for implementing it, you could create/check for the presence of a 0kb lock file, and if it detects it while you are trying to overwrite that save, it would give an error. But if you were trying to restore the save, it would skip over the .lock file.

micah686 avatar Oct 12 '20 18:10 micah686

Would be better to put a .lock extension on the directory name. if some wierd game has a .lock file in the same place we could run into issues.

Sent from my iPad

On Oct 12, 2020, at 1:09 PM, micah686 [email protected] wrote:

 It would be nice if we could "lock" the save files that we have dumped from being overwritten. So if there is like a save dump that you made after completing a hard mission or whatever, you could "lock" it, so that JKSV would not even give the option of overwriting it.

Maybe for implementing it, you could create/check for the presence of a 0kb lock file, and if it detects it while you are trying to overwrite that save, it would give an error. But if you were trying to restore the save, it would skip over the .lock file.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

fennectech avatar Oct 13 '20 03:10 fennectech

I suppose that could also work. The lock file could also be named something unique, like .jksv_lock to reduce the chances that something uses that file type.

Or, there could be a text file/database in the SD:/JKSV folder that keeps track of what folders are locked.

micah686 avatar Oct 13 '20 03:10 micah686

Tho. Tbh the current prevention mechanism for protecting overwriting stuff is quite suitable. Someone has to hold the button for 3 or 4 seconds. If someone wants to lock jksv itself out a pin could be provided in the config file. But other than that. Its quite a bit harder already to inadvertaintly overwrite stuff as the timegating for overwrites gives you plenty of time to "Oh shit. Wrong file!"

fennectech avatar Oct 13 '20 04:10 fennectech

I'm pretty sure I added code to grab extensions from file names a few months ago. So, I guess adding code to look for a certain extension would work for this.

J-D-K avatar Oct 16 '20 09:10 J-D-K

We could just use the write protect attribute @J-D-K

fennectech avatar Oct 23 '20 23:10 fennectech