Fixes for direct cloud storage copying
This commit is contained in:
parent
68fe537b08
commit
cccb1651f5
1 changed files with 3 additions and 0 deletions
|
@ -224,6 +224,8 @@ class _CloudStorage(BaseStorage):
|
||||||
return k.etag[1:-1][:7]
|
return k.etag[1:-1][:7]
|
||||||
|
|
||||||
def copy_to(self, destination, path):
|
def copy_to(self, destination, path):
|
||||||
|
self._initialize_cloud_conn()
|
||||||
|
|
||||||
# First try to copy directly via boto, but only if the storages are the
|
# First try to copy directly via boto, but only if the storages are the
|
||||||
# same type, with the same access information.
|
# same type, with the same access information.
|
||||||
if (self.__class__ == destination.__class__ and
|
if (self.__class__ == destination.__class__ and
|
||||||
|
@ -235,6 +237,7 @@ class _CloudStorage(BaseStorage):
|
||||||
source_path = self._init_path(path)
|
source_path = self._init_path(path)
|
||||||
source_key = self._key_class(self._cloud_bucket, source_path)
|
source_key = self._key_class(self._cloud_bucket, source_path)
|
||||||
|
|
||||||
|
destination._initialize_cloud_conn()
|
||||||
dest_path = destination._init_path(path)
|
dest_path = destination._init_path(path)
|
||||||
source_key.copy(destination._cloud_bucket, dest_path)
|
source_key.copy(destination._cloud_bucket, dest_path)
|
||||||
return
|
return
|
||||||
|
|
Reference in a new issue