Mercurial > public > mercurial-scm > hg
comparison mercurial/vfs.py @ 53041:46603c00a9f2 stable
stream: audit path on encoded path
In 5b8f6e198a6e, we wrongly called `vfs._auditpath` on the pre-encoding path, so
we would get abort on problem that the encoding is here to handle.
So we fix the problem (easily) and update the test to cover this (with
significantly more work).
Thanks to Matt Harbison for spotting this during the freeze.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Tue, 11 Mar 2025 10:37:39 +0100 |
parents | 22e264ac7f60 |
children |
comparison
equal
deleted
inserted
replaced
53040:25079cc2016f | 53041:46603c00a9f2 |
---|---|
474 return (path, mode):: | 474 return (path, mode):: |
475 | 475 |
476 <path> is the real file system path content should be written to, | 476 <path> is the real file system path content should be written to, |
477 <mode> is the file mode that need to be set if any. | 477 <mode> is the file mode that need to be set if any. |
478 """ | 478 """ |
479 self._auditpath(path, b'wb') | 479 real_path = self.join(path) |
480 self._auditpath(real_path, b'wb') | |
480 self.register_file(path) | 481 self.register_file(path) |
481 real_path = self.join(path) | |
482 dirname, basename = util.split(real_path) | 482 dirname, basename = util.split(real_path) |
483 if dirname not in known_directories: | 483 if dirname not in known_directories: |
484 util.makedirs(dirname, self.createmode, True) | 484 util.makedirs(dirname, self.createmode, True) |
485 known_directories.add(dirname) | 485 known_directories.add(dirname) |
486 mode = None | 486 mode = None |