We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b526dda commit 4209414Copy full SHA for 4209414
1 file changed
src/e3/fs.py
@@ -1203,10 +1203,8 @@ def safe_copy_ficlone(src: FileInfo, dst: FileInfo) -> None:
1203
# If dst was already a file open does not adjust the mode
1204
os.fchmod(dst_fd, src.stat.st_mode)
1205
1206
- if not preserve_timestamps and os_utime:
1207
- # By default FICLONE preserve timestamps. So adjust timestamp to now
1208
- # only if preserve_timestamps is False.
1209
- os_utime(dst_fd, None)
+ if preserve_timestamps and os_utime:
+ os_utime(dst_fd, ns=(src.stat.st_atime_ns, src.stat.st_mtime_ns))
1210
1211
except OSError:
1212
# We will probably have the same issue with all files
0 commit comments