tonioni / WinUAE

WinUAE Amiga emulator
http://www.winuae.net/
552 stars 90 forks source link

Weird floppy saveimage naming scheme inconsistency #271

Open johnnovak opened 10 months ago

johnnovak commented 10 months ago

Maybe just a question... but I'm leaning towards issue as this is confusing behaviour.

So, effectively the underscore and the dot in _save.adf switch places depending on the state of this switch.

Relevant code: https://github.com/tonioni/WinUAE/blob/master/disk.cpp#L1121-L1128

I don't see why this behaviour is desirable or useful? If anything, it's confusing and inconsistent -- shouldn't this only affect the paths but not the actual filenames? That's what the option's name says.

Maybe this is some backward compatibility feature I'm unware of? Even if that's the case, silently allowing the legacy name would be a better option for reading existing images, then for creating new saveimages it would be better to pick a single naming scheme consistently.

If anything, this creates compatibility problems between different configs. Depending on the state of "Use original image's path", you need to convert the filenames of the saveimages when moving them between different setups.


(I'm fussy about such things are I'm in the process of creating some newcomer-friendly WinUAE-based game packs, and weird inconsistencies and special cases like this take a lot of explaining and will trip up everybody... until they eventually get used to it after lots of head scratching 😅)

tonioni commented 9 months ago

I don't remember but it has to be some backwards compatibility feature. I'll probably get rid of it in later versions. But there is also possibility this will break something..

tonioni commented 7 months ago

I finally found the reason for this naming logic. Originally "saveimages" were only saved in \saveimages but (much) later option was added that saves saveimages in same directory as main adf. This introduced a small "problem": both had .adf extension which made it difficult to quickly see which files are "real" adfs and which are saveimages. I decided to use name extension .save_adf which makes it easy (for normal users) to separate file types but for compatibility purposes I didn't want to change old naming style.

Next version will always check both naming styles which removes the need to rename files (both Paths panel options will find both names automatically). I am not yet sure if I want to make it the only naming style. Backwards compatibility is high priority.

johnnovak commented 7 months ago

Next version will always check both naming styles which removes the need to rename files (both Paths panel options will find both names automatically). I am not yet sure if I want to make it the only naming style. Backwards compatibility is high priority.

Sounds great Toni. Probably a good way forward would be to only write .adf but read both for backwards compatibility reasons.