[pp:metadata] fix using '..' in directories on Windows (#5942, #6094)

This commit is contained in:
Mike Fährmann
2024-08-27 14:38:40 +02:00
parent f669b3f046
commit eef5beb841
2 changed files with 19 additions and 14 deletions

View File

@@ -114,7 +114,10 @@ class MetadataPP(PostProcessor):
if archive and archive.check(pathfmt.kwdict):
return
directory = self._directory(pathfmt)
if util.WINDOWS and pathfmt.extended:
directory = pathfmt._extended_path(self._directory(pathfmt))
else:
directory = self._directory(pathfmt)
path = directory + self._filename(pathfmt)
if self.skip and os.path.exists(path):