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

Base.parent does not work if dataset contains a backslash #1161

Closed
mkitti opened this issue Jul 17, 2024 · 1 comment · Fixed by #1162
Closed

Base.parent does not work if dataset contains a backslash #1161

mkitti opened this issue Jul 17, 2024 · 1 comment · Fixed by #1162

Comments

@mkitti
Copy link
Member

mkitti commented Jul 17, 2024

For a dataset with a name of "/X/somelab/RW10557/031021/Pos0/segmentation/RegB/045/E10\", Base.parent does not work. It attempts to look for "/X/somelab/RW10557/031021/Pos0/segmentation/RegB/045/E10" since that is the result of dirname.

Instead we should strictly look for /. This is still possibly incorrect since the name of the dataset could contain a /.

@mkitti
Copy link
Member Author

mkitti commented Jul 17, 2024

xref: HDF5 Path Names and Navigation.

A BNF grammar for path names

PathName ::= AbsolutePathName | RelativePathName
Separator ::= "/" ["/"]*
AbsolutePathName ::= Separator [ RelativePathName ]
RelativePathName ::= Component [ Separator RelativePathName ]*
Component ::= "." | Name
Name ::= Character+ - {"."}
Character ::= {c: c in {{ legal ASCII characters } - {'/'}}

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 a pull request may close this issue.

1 participant