You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On the CLI, the user expects that paths are resolved once (on the input side) and from then onwards everything is automatically done relative to the workspace (whenever possible). So if a file path is absolute, then its workspace prefix gets removed regarding METS FLocat. Or if it is relative, then it is relative to the CWD, but gets resolved relative to the workspace.
Unfortunately, that's not what we have implemented yet, esp. if you combine with an overall -d path/to/workspace (so CWD is not equal workspace directory).
So if one tries to compensate for the above path resolving issue by passing a glob relative to the workspace, then that itself will break the METS with a verbatim asterisk path entry:
On the CLI, the user expects that paths are resolved once (on the input side) and from then onwards everything is automatically done relative to the workspace (whenever possible). So if a file path is absolute, then its workspace prefix gets removed regarding METS FLocat. Or if it is relative, then it is relative to the CWD, but gets resolved relative to the workspace.
Unfortunately, that's not what we have implemented yet, esp. if you combine with an overall
-d path/to/workspace
(so CWD is not equal workspace directory).For example, in
add_file
, we currently have:core/src/ocrd/cli/workspace.py
Lines 221 to 222 in 2993010
Meaning, the workspace directory gets added, with no regard to the caller's CWD.
Another example is in
bulk_add
, where we do:core/src/ocrd/cli/workspace.py
Lines 375 to 381 in 2993010
Here, again, no difference is made between CWD and self.directory.
In the latter case (bulk-add), what makes things worse is that the glob pattern gets treated verbatim if empty:
core/src/ocrd/cli/workspace.py
Lines 333 to 335 in 2993010
So if one tries to compensate for the above path resolving issue by passing a glob relative to the workspace, then that itself will break the METS with a verbatim asterisk path entry:
The text was updated successfully, but these errors were encountered: