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

fs provider for directory complains about files that are not actually in the directory #176

Open
snhirsch opened this issue Sep 11, 2020 · 3 comments

Comments

@snhirsch
Copy link

If I assign a directory named 'os9' as a provider it seems to work fine. If the directory is named anything else, I get complaints about being unable to stat a file (os9 drive b) that simply does not exist.

@snhirsch
Copy link
Author

snhirsch commented Sep 11, 2020

Update: After poking around under a debugger I figured out what was happening. I specify the assign as
-A0:fs=/home/hirsch/test
Rather than directly looking for an object named 'test' under my home directory, it scans the entire directory and tries to stat everything in it. One of the objects was a dangling symlink to 'OS9 DRIVE B', so stat() fails at that point and the scan gives up with an error - but rather than terminating it leaves the program running with nothing assigned! It seems to me that if an object is specified the program should simply try to stat that particular object.

I don't understand the rationale behind the directory scan.

@fachat
Copy link
Owner

fachat commented Sep 11, 2020

The reason the scanning is done is that the algorithm tries to navigate into P00 files as well as D64 and other files.
Unfortunately P00 files can have a CBM name inside that does not at all match the host's filename, so it has to be read and looked into.

For example you can scan into a D80 disk image (as a directory), then have a D64 file as directory in it, and a P00 file in that one. Ok, maybe that's a bit crazy, but should work.

But yes, the algorithm could be optimized.

@snhirsch
Copy link
Author

Thanks. I understand why you need to check files, but it might be better to first determine if the specified object is a directory and, if so, restrict the scan to the files within it. But perhaps I'm not grasping your vision for on disk organization.

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