Skip to content

Commit

Permalink
safe_copy only works with string paths, not Paths
Browse files Browse the repository at this point in the history
  • Loading branch information
jgfouca committed Mar 22, 2024
1 parent ac58175 commit bb1622a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions components/eamxx/scripts/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -437,6 +437,10 @@ def safe_copy(src_path, tgt_path, preserve_meta=True):
permissions of the src files.
"""

# Only works for str paths for now
src_path = str(src_path)
tgt_path = str(tgt_path)

tgt_path = (
os.path.join(tgt_path, os.path.basename(src_path))
if os.path.isdir(tgt_path)
Expand Down

0 comments on commit bb1622a

Please sign in to comment.