File tree Expand file tree Collapse file tree 2 files changed +12
-6
lines changed
Expand file tree Collapse file tree 2 files changed +12
-6
lines changed Original file line number Diff line number Diff line change @@ -74,12 +74,17 @@ def s3(self):
7474
7575 def _make_external_filepath (self , relative_filepath ):
7676 """resolve the complete external path based on the relative path"""
77- posix_path = PurePosixPath (PureWindowsPath (self .spec ['location' ]))
78- location_path = Path (
79- * posix_path .parts [1 :]) if any (
80- case in posix_path .parts [0 ] for case in (
81- '\\ ' , ':' )) else Path (posix_path )
82- return PurePosixPath (location_path , relative_filepath )
77+ if self .spec ['protocol' ] == 's3' :
78+ posix_path = PurePosixPath (PureWindowsPath (self .spec ['location' ]))
79+ location_path = Path (
80+ * posix_path .parts [1 :]) if any (
81+ case in posix_path .parts [0 ] for case in (
82+ '\\ ' , ':' )) else Path (posix_path )
83+ return PurePosixPath (location_path , relative_filepath )
84+ elif self .spec ['protocol' ] == 'file' :
85+ return PurePosixPath (Path (self .spec ['location' ]), relative_filepath )
86+ else :
87+ assert False
8388
8489 def _make_uuid_path (self , uuid , suffix = '' ):
8590 """create external path based on the uuid hash"""
Original file line number Diff line number Diff line change 77from . import S3_CONN_INFO
88from . import CONN_INFO
99from datajoint .migrate import _migrate_dj011_blob
10+ dj .config ['enable_python_native_blobs' ] = True
1011
1112
1213class TestBlobMigrate :
You can’t perform that action at this time.
0 commit comments