Skip to content

Commit

Permalink
Merge pull request #774 from nrybowski/tests_fixes
Browse files Browse the repository at this point in the history
[filesystems/local] copy_to() fixes
  • Loading branch information
anthonygego committed Mar 10, 2022
2 parents 7cf81aa + 9abc7d2 commit 34c7e09
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion inginious/common/filesystems/local.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,10 @@ def _recursive_overwrite(self, src, dest):
self._recursive_overwrite(os.path.join(src, file),
os.path.join(dest, file))
else:
shutil.copyfile(src, dest, follow_symlinks=False)
dirname = os.path.dirname(dest)
if not os.path.exists(dirname):
os.makedirs(dirname)
shutil.copy(src, dest, follow_symlinks=False)

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

0 comments on commit 34c7e09

Please sign in to comment.