In the file copy, ensure that the parent folder is created

This commit is contained in:
Thomas Nagy 2012-04-02 01:56:24 +02:00
parent 3987a8e7fd
commit c3067e0912
2 changed files with 5 additions and 8 deletions

View File

@ -708,20 +708,14 @@ class Node(object):
if node:
if not os.path.isfile(node.abspath()):
node.sig = None
try:
node.parent.mkdir()
except OSError:
pass
node.parent.mkdir()
return node
self = self.get_src()
node = self.find_node(lst)
if node:
if not os.path.isfile(node.abspath()):
node.sig = None
try:
node.parent.mkdir()
except OSError:
pass
node.parent.mkdir()
return node
node = self.get_bld().make_node(lst)
node.parent.mkdir()

View File

@ -770,6 +770,9 @@ def process_subst(self):
if isinstance(x, str) and isinstance(y, str) and x == y:
a = self.path.find_node(x)
b = self.path.get_bld().make_node(y)
if not os.path.isfile(b.abspath()):
b.sig = None
b.parent.mkdir()
else:
if isinstance(x, str):
a = self.path.find_resource(x)