Compatibility with packing read-only source files
File permissions are no longer copied when packing. This means that read-only source files can still be packed without errors, even when they have to be rewritten (due to changed paths). Reviewed by: sybren Differential Revision: https://developer.blender.org/D13128
This commit is contained in:
committed by
Sybren A. Stüvel
parent
2843cce6fd
commit
608a7bdac9
@@ -152,12 +152,12 @@ class FileCopier(transfer.FileTransferer):
|
||||
return True
|
||||
|
||||
def _move(self, srcpath: pathlib.Path, dstpath: pathlib.Path):
|
||||
"""Low-level file move"""
|
||||
"""Low-level file move."""
|
||||
shutil.move(str(srcpath), str(dstpath))
|
||||
|
||||
def _copy(self, srcpath: pathlib.Path, dstpath: pathlib.Path):
|
||||
"""Low-level file copy"""
|
||||
shutil.copy2(str(srcpath), str(dstpath))
|
||||
"""Low-level file copy. dstpath needs to be a file and not a directory."""
|
||||
shutil.copyfile(str(srcpath), str(dstpath))
|
||||
|
||||
def move(self, srcpath: pathlib.Path, dstpath: pathlib.Path):
|
||||
s_stat = srcpath.stat()
|
||||
|
||||
Reference in New Issue
Block a user