mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-10 15:28:34 +01:00
output: check if dir exists before creating it
Signed-off-by: Ruslan Kuprieiev <[email protected]>
This commit is contained in:
+5
-1
@@ -235,7 +235,11 @@ class Output(Dependency):
|
||||
|
||||
for relpath, cache in self.dir_cache().items():
|
||||
path = os.path.join(self.path, relpath)
|
||||
os.makedirs(os.path.dirname(path))
|
||||
dname = os.path.dirname(path)
|
||||
|
||||
if not os.path.exists(dname):
|
||||
os.makedirs(dname)
|
||||
|
||||
self.hardlink(cache, path)
|
||||
|
||||
def save(self):
|
||||
|
||||
Reference in New Issue
Block a user