changeset 41090:c8006a25b845

vfs: makes all audited path relative Only auditing relative path helps the vfs warning logic.
author Boris Feld <boris.feld@octobus.net>
date Sun, 02 Jul 2017 04:51:03 +0200
parents a59a74721c76
children d9b6b9ed96d8
files mercurial/vfs.py
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/vfs.py	Fri Dec 21 13:17:58 2018 +0100
+++ b/mercurial/vfs.py	Sun Jul 02 04:51:03 2017 +0200
@@ -339,6 +339,8 @@
 
     def _auditpath(self, path, mode):
         if self._audit:
+            if os.path.isabs(path) and path.startswith(self.base):
+                path = os.path.relpath(path, self.base)
             r = util.checkosfilename(path)
             if r:
                 raise error.Abort("%s: %r" % (r, path))