Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Weird floppy saveimage naming scheme inconsistency #271

Open
johnnovak opened this issue Jan 1, 2024 · 3 comments
Open

Weird floppy saveimage naming scheme inconsistency #271

johnnovak opened this issue Jan 1, 2024 · 3 comments

Comments

@johnnovak
Copy link

johnnovak commented Jan 1, 2024

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

  • If "Use original image's path" is ticked in the Paths tab, saveimages are saved as BASENAME.save_adf
  • If it's unticked, the filename is different; it's BASENAME_save.adf

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 😅)

@johnnovak johnnovak changed the title Werid floppy saveimage naming scheme inconsistency Weird floppy saveimage naming scheme inconsistency Jan 1, 2024
@tonioni
Copy link
Owner

tonioni commented Feb 5, 2024

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
Copy link
Owner

tonioni commented Apr 6, 2024

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
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants