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

FileSystem: Support / and drive:/ #2787

Merged
merged 2 commits into from
May 23, 2022
Merged

FileSystem: Support / and drive:/ #2787

merged 2 commits into from
May 23, 2022

Conversation

Ghabry
Copy link
Member

@Ghabry Ghabry commented May 20, 2022

Havn't done any hardware tests yet, only operated on / and --project-path romfs:/ to verify this behaviour

When using / as the --project-path the / was removed making this empty string which is then handled as the working directory (is silently converted to . at the important places). This is completely wrong.

Similiar problem with drive letters (drive:/). Windows does not care if you use C: or C:/, which is what I used for testing here.
Unfortunately ctrulib and others are more strict here and want the /.


Fixing this was not that terrible.

Functions that are drive-aware now: MakeCanonical, GetPathAndFilename, the substring calculation in FindFile.

Also added Unit Tests to verify this behaviour.

@Ghabry Ghabry added this to the 0.7.1 milestone May 20, 2022
Copy link
Member

@carstene1ns carstene1ns left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The unit tests prove it works ;-)

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

Successfully merging this pull request may close these issues.

3 participants