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

HostFS: Fix behavior of realpath() on Windows. Clear carry flag on return from hostfs ACPTR #479

Merged
merged 3 commits into from
Feb 8, 2023

Conversation

mooinglemur
Copy link
Contributor

This PR addresses two distinct problems.

_fullpath() on windows returns a valid path even if the final part does not exist. This differs from the behavior of realpath(), so I changed the macro into a function call that implements realpath() behavior on Windows.

Emulated ACPTR was leaving the state of the carry flag alone, which confuses BASIC if it's not cleared.. This is the counterpart of the behavior for write that was described in #416 which I had fixed in the main hostfs PR, but for reading instead of writing. The real ROM code clears carry unconditionally on return from ACPTR, so the hostfs code must as well.

@mooinglemur
Copy link
Contributor Author

fleshed out the behavior of Windows realpath() emulation to follow proper behavior if the second arg is not NULL, even though all of the current uses of the function in the project pass NULL in the second arg.

@indigodarkwolf
Copy link
Collaborator

Looks fine to me. Thanks for the fixes!

@indigodarkwolf indigodarkwolf merged commit 06816b5 into commanderx16:master Feb 8, 2023
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

Successfully merging this pull request may close these issues.

2 participants