This is an automated email from the ASF dual-hosted git repository.

juergbi pushed a commit to branch jbilleter/filebaseddirectory
in repository https://gitbox.apache.org/repos/asf/buildstream.git

commit d79c725b98c39a806d716e1611f479450c1785d7
Author: Jürg Billeter <[email protected]>
AuthorDate: Sat Oct 3 20:31:48 2026 +0200

    _filebaseddirectory.py: Don't let `utime()` follow symlinks
---
 src/buildstream/storage/_filebaseddirectory.py | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/buildstream/storage/_filebaseddirectory.py 
b/src/buildstream/storage/_filebaseddirectory.py
index 14eaa7915..0750b9168 100644
--- a/src/buildstream/storage/_filebaseddirectory.py
+++ b/src/buildstream/storage/_filebaseddirectory.py
@@ -266,7 +266,11 @@ class FileBasedDirectory(Directory):
             )
             if update_mtime:
                 for f in import_result.files_written:
-                    os.utime(os.path.join(self.__external_directory, f), 
times=(update_mtime, update_mtime))
+                    os.utime(
+                        os.path.join(self.__external_directory, f),
+                        times=(update_mtime, update_mtime),
+                        follow_symlinks=False,
+                    )
         else:
             #
             # We're dealing with an abstract Directory object

Reply via email to