From 21b854e92db2a6f273aa3dc613cace60abbce8bb Mon Sep 17 00:00:00 2001 From: Maks Snegov Date: Sun, 20 Jun 2021 19:15:51 +0300 Subject: [PATCH] Fix setting mtime for directories in recursive_hardlinking --- spqr/curateipsum/fs.py | 1 + 1 file changed, 1 insertion(+) diff --git a/spqr/curateipsum/fs.py b/spqr/curateipsum/fs.py index 2e5f162..9202bfd 100644 --- a/spqr/curateipsum/fs.py +++ b/spqr/curateipsum/fs.py @@ -235,6 +235,7 @@ def _recursive_hardlink(src, dst): ent_stat = ent.stat(follow_symlinks=False) os.chown(ent_dst_path, ent_stat.st_uid, ent_stat.st_gid) 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 _recursive_hardlink(ent.path, ent_dst_path)