Skip to content

Commit 8573ef3

Browse files
Add descriptive comments.
1 parent a3d54de commit 8573ef3

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

datajoint/external.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,13 +74,15 @@ def s3(self):
7474

7575
def _make_external_filepath(self, relative_filepath):
7676
"""resolve the complete external path based on the relative path"""
77+
# Strip root
7778
if self.spec['protocol'] == 's3':
7879
posix_path = PurePosixPath(PureWindowsPath(self.spec['location']))
7980
location_path = Path(
8081
*posix_path.parts[1:]) if any(
8182
case in posix_path.parts[0] for case in (
8283
'\\', ':')) else Path(posix_path)
8384
return PurePosixPath(location_path, relative_filepath)
85+
# Preserve root
8486
elif self.spec['protocol'] == 'file':
8587
return PurePosixPath(Path(self.spec['location']), relative_filepath)
8688
else:

0 commit comments

Comments
 (0)