Skip to content

Commit

Permalink
[filesystems/local] use copy2 instead of copy (#840)
Browse files Browse the repository at this point in the history
This keeps the file metadata (permissions, dates, ...). Fix #390
  • Loading branch information
anaHue committed Jul 12, 2022
1 parent d5726df commit 7de1fb1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion inginious/common/filesystems/local.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ def _recursive_overwrite(self, src, dest):
dirname = os.path.dirname(dest)
if not os.path.exists(dirname):
os.makedirs(dirname)
shutil.copy(src, dest, follow_symlinks=False)
shutil.copy2(src, dest, follow_symlinks=False)

def distribute(self, filepath, allow_folders=True):
self._checkpath(filepath)
Expand Down

0 comments on commit 7de1fb1

Please sign in to comment.