output: check if dir exists before creating it

Signed-off-by: Ruslan Kuprieiev <[email protected]>
This commit is contained in:
Ruslan Kuprieiev
2018-02-13 13:46:02 +02:00
parent 52ed413a08
commit 5824d391f1
+5 -1
View File
@@ -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):