stashutils.extensions: create parent directories if they do not yet exist
@@ -24,6 +24,9 @@ def create_file(dest, content):
"""
if not isinstance(content, (binary_type, text_type)):
content = content.read()
+ parent = os.path.dest(dest)
+ if not os.path.exists(parent):
+ os.makedirs(parent)
with open(dest, "wb") as f:
f.write(content)
return dest
