Skip to content
This repository has been archived by the owner on Aug 30, 2024. It is now read-only.

Commit

Permalink
Make missing directories before the copy.
Browse files Browse the repository at this point in the history
Signed-off-by: dlorenc <[email protected]>
  • Loading branch information
dlorenc committed Mar 16, 2018
1 parent 342d3f9 commit 0ab3f9a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions store/git/git.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,10 @@ def get(self, get):
file_location = os.path.join(self.store_location, self.key)
if os.path.exists(get) and self.suppress_error:
os.remove(get)
# Make sure the directory exists.
dirname = os.path.dirname(get)
if not os.path.exists(dirname):
os.makedirs(dirname)
self._execute(commands = [
['cp', file_location, get]
])
Expand Down

0 comments on commit 0ab3f9a

Please sign in to comment.