Skip to content

Commit

Permalink
FIX: Avoid running os.makedirs on empty string
Browse files Browse the repository at this point in the history
skipci
  • Loading branch information
cortadocodes committed Apr 29, 2024
1 parent d672d28 commit 0ba5983
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion octue/utils/metadata.py
Expand Up @@ -106,7 +106,9 @@ def _get_absolute_path(path):
try:
return os.path.abspath(path)
except FileNotFoundError:
os.makedirs(os.path.dirname(path), exist_ok=True)

if os.path.dirname(path):
os.makedirs(os.path.dirname(path), exist_ok=True)

with open(path, "w") as f:
json.dump({}, f)
Expand Down

0 comments on commit 0ba5983

Please sign in to comment.