We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a3d54de commit 8573ef3Copy full SHA for 8573ef3
datajoint/external.py
@@ -74,13 +74,15 @@ def s3(self):
74
75
def _make_external_filepath(self, relative_filepath):
76
"""resolve the complete external path based on the relative path"""
77
+ # Strip root
78
if self.spec['protocol'] == 's3':
79
posix_path = PurePosixPath(PureWindowsPath(self.spec['location']))
80
location_path = Path(
81
*posix_path.parts[1:]) if any(
82
case in posix_path.parts[0] for case in (
83
'\\', ':')) else Path(posix_path)
84
return PurePosixPath(location_path, relative_filepath)
85
+ # Preserve root
86
elif self.spec['protocol'] == 'file':
87
return PurePosixPath(Path(self.spec['location']), relative_filepath)
88
else:
0 commit comments