diff --git a/Common/metadata.py b/Common/metadata.py index 98070eb5..b2f9ca32 100644 --- a/Common/metadata.py +++ b/Common/metadata.py @@ -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)