From 5283d7a20524dccc5726ac724329635f3f11bf38 Mon Sep 17 00:00:00 2001 From: "Bernhard M. Wiedemann" Date: Tue, 30 Apr 2024 03:02:39 +0200 Subject: [PATCH] cpio: Do not follow symlinks in 'touch' commit 46ae2cd7 introduced normalizing mtimes but would erroneously change the target of symlinks instead of the symlink itself. --- TarSCM/archive.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TarSCM/archive.py b/TarSCM/archive.py index bb28fb22..e93eb982 100644 --- a/TarSCM/archive.py +++ b/TarSCM/archive.py @@ -118,7 +118,7 @@ def create_archive(self, scm_object, **kwargs): tstamp = self.helpers.get_timestamp(scm_object, args, topdir) for name in sorted(cpiolist): try: - os.utime(name, (tstamp, tstamp)) + os.utime(name, (tstamp, tstamp), follow_symlinks=False) except OSError: pass # bytes() break in python2 with a TypeError as it expects only 1