mercurial/vfs.py
branchstable
changeset 53041 46603c00a9f2
parent 52930 22e264ac7f60
--- a/mercurial/vfs.py	Tue Mar 11 10:33:15 2025 +0100
+++ b/mercurial/vfs.py	Tue Mar 11 10:37:39 2025 +0100
@@ -476,9 +476,9 @@
             <path> is the real file system path content should be written to,
             <mode> is the file mode that need to be set if any.
         """
-        self._auditpath(path, b'wb')
+        real_path = self.join(path)
+        self._auditpath(real_path, b'wb')
         self.register_file(path)
-        real_path = self.join(path)
         dirname, basename = util.split(real_path)
         if dirname not in known_directories:
             util.makedirs(dirname, self.createmode, True)