Fix cookies getting deleted

This commit is contained in:
Joscha 2021-05-15 22:25:41 +02:00
parent 05573ccc53
commit 989032fe0c
2 changed files with 8 additions and 4 deletions

View File

@ -378,7 +378,7 @@ class OutputDirectory:
pass
async def _cleanup_file(self, path: Path, pure: PurePath) -> None:
if self._report.marked(pure):
if self._report.is_marked(pure):
return
if await self._conflict_delete_lf(self._on_conflict, pure):

View File

@ -62,7 +62,7 @@ class Report:
detail, see the respective exception's docstring.
"""
for other in self.known_files & self.reserved_files:
for other in self.marked:
if path == other:
raise MarkDuplicateException(path)
@ -71,8 +71,12 @@ class Report:
self.known_files.add(path)
def marked(self, path: PurePath) -> bool:
return path in self.known_files
@property
def marked(self) -> Set[PurePath]:
return self.known_files | self.reserved_files
def is_marked(self, path: PurePath) -> bool:
return path in self.marked
def add_file(self, path: PurePath) -> None:
"""