Skip to content

Commit

Permalink
syscontainers: ensure storage_path exists before using it
Browse files Browse the repository at this point in the history
Closes: projectatomic#1138

Signed-off-by: Giuseppe Scrivano <[email protected]>
  • Loading branch information
giuseppe committed Nov 29, 2017
1 parent e5124cc commit 37b4bec
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Atomic/syscontainers.py
Original file line number Diff line number Diff line change
Expand Up @@ -1060,6 +1060,8 @@ def _find_ostree_repo_location(self):
# Use /ostree/repo if it already exists and it is on the same filesystem
# as the checkout directory.
if os.path.exists("/ostree/repo/config"):
if not os.path.exists(storage_path):
os.makedirs(storage_path)
if SystemContainers._is_repo_on_the_same_filesystem("/ostree/repo", storage_path):
return "/ostree/repo"
return os.path.join(storage_path, "ostree")
Expand Down

0 comments on commit 37b4bec

Please sign in to comment.