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

Consistently normalize paths #78

Merged
merged 1 commit into from
Oct 22, 2024
Merged

Conversation

leoschwarz
Copy link
Collaborator

@leoschwarz leoschwarz commented Oct 22, 2024

Fixes #76

Input paths were normalized inconsistently before. This will be fixed by this PR and will also yield better error messages if a similar problem reoccurs.

As a result the simple Bash-style leading tilde expansion pattern is supported now (which was the problem in #76, not relative paths in general), more complex forms are not (e.g. ~user or any other more advanced ones as these are very shell specific).

Note that these pattern features are widely unsupported or inconsistently supported by many tools and libraries, for instance the md5sum tool from GNU Coreutils doesn't understand the tilde either:

grafik

@leoschwarz leoschwarz changed the title Consistently normalize paths, fixes #76 Consistently normalize paths Oct 22, 2024
@tobiasko
Copy link
Collaborator

nice! Yes, you are right, this is a tilde expansion. But would a ../sample.raw now also work?

@leoschwarz
Copy link
Collaborator Author

Yes, while normalizePath does not convert such a relative path into an absolute path, it is supported. e.g. I tested rawr::readFileHeader with ../extdata/sample.raw (on macOS; but it should work on Windows too).

@cpanse cpanse merged commit ea4b2e4 into fgcz:devel Oct 22, 2024
1 check passed
@leoschwarz leoschwarz deleted the normalize-paths branch October 22, 2024 13:29
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.

Newbie: can't even get the first command to run properly
3 participants