Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Windows prov paths #207

Open
claireh93 opened this issue Jun 22, 2023 · 1 comment
Open

Windows prov paths #207

claireh93 opened this issue Jun 22, 2023 · 1 comment
Assignees

Comments

@claireh93
Copy link

Adding a forward slash in provenance reports when combining root and location.

@richardreeve
Copy link
Member

richardreeve commented Jun 27, 2023

Just to be clear, there's an issue here that when you look on the prov reports from a local Windows data registry, you get a / inserted between the root and the location of files, but it should be a \ - i.e. the separator is not platform-specific.

antony-wilson added a commit that referenced this issue Jul 13, 2023
When generating a `full_uri` a `\` was used to join the storage_root and
the path.

```
if (self.storage_root.root.startswith('/') or
self.storage_root.root.startswith('file://')) and not
self.storage_root.root.endswith('/'):
   return self.storage_root.root + '/' + self.path
return self.storage_root.root + self.path
```

This has been replaced with:

```
relative_path = self.path.lstrip("/").lstrip("\\")
return os.path.join(self.storage_root.root, relative_path)
```
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants