remote: base: call makedirs in move

Remotes like s3/gs/etc don't need to create dirs in advance.

Signed-off-by: Ruslan Kuprieiev <[email protected]>
This commit is contained in:
Ruslan Kuprieiev
2019-08-10 04:53:50 +03:00
parent e9b1e7797e
commit baa548eec9
2 changed files with 2 additions and 1 deletions
-1
View File
@@ -364,7 +364,6 @@ class RemoteBASE(object):
cache_info = self.checksum_to_path_info(checksum)
if self.changed_cache(checksum):
self.makedirs(cache_info.parent)
self.move(path_info, cache_info)
else:
self.remove(path_info)
+2
View File
@@ -243,6 +243,8 @@ class RemoteLOCAL(RemoteBASE):
if from_info.scheme != "local" or to_info.scheme != "local":
raise NotImplementedError
self.makedirs(to_info.parent)
if self.isfile(from_info):
mode = self._file_mode
else: