Fix setting mtime for directories in recursive_hardlinking
This commit is contained in:
parent
862c20ed24
commit
21b854e92d
@ -235,6 +235,7 @@ def _recursive_hardlink(src, dst):
|
|||||||
ent_stat = ent.stat(follow_symlinks=False)
|
ent_stat = ent.stat(follow_symlinks=False)
|
||||||
os.chown(ent_dst_path, ent_stat.st_uid, ent_stat.st_gid)
|
os.chown(ent_dst_path, ent_stat.st_uid, ent_stat.st_gid)
|
||||||
os.chmod(ent_dst_path, ent_stat.st_mode)
|
os.chmod(ent_dst_path, ent_stat.st_mode)
|
||||||
|
os.utime(ent_dst_path, (ent_stat.st_atime, ent_stat.st_mtime))
|
||||||
|
|
||||||
# process directory children
|
# process directory children
|
||||||
_recursive_hardlink(ent.path, ent_dst_path)
|
_recursive_hardlink(ent.path, ent_dst_path)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user