Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
paulmueller committed Nov 14, 2023
1 parent 7dafda9 commit d446378
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion mpl_data_cast/recipe.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,9 @@ def get_target_path(self, path_list: list) -> pathlib.Path:

def get_temp_path(self, path_list: list) -> pathlib.Path:
"""Return a unique temporary file name"""
hash1 = hashlib.md5(str(path_list[0]).encode("utf-8")).hexdigest()
self.tempdir.mkdir(parents=True, exist_ok=True)
# Create a hash of the file path
hash1 = hashlib.md5(str(path_list[0]).encode("utf-8")).hexdigest()
return self.tempdir / f"{hash1}_{uuid.uuid4()}_{path_list[0].name}"

@staticmethod
Expand Down

0 comments on commit d446378

Please sign in to comment.