Skip to content

Commit

Permalink
fixing this check - it should be the parent dir not the file
Browse files Browse the repository at this point in the history
  • Loading branch information
EvanDietzMorris committed Dec 17, 2024
1 parent 77aebfc commit 55af98b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Common/metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def init_metadata(self):
raise NotImplementedError()

def save_metadata(self):
if not os.path.isfile(self.metadata_file_path):
if not os.path.isdir(os.path.dirname(self.metadata_file_path)):
os.makedirs(os.path.dirname(self.metadata_file_path))
with open(self.metadata_file_path, 'w') as meta_json_file:
json.dump(self.metadata, meta_json_file, indent=4)
Expand Down

0 comments on commit 55af98b

Please sign in to comment.