Sebastian Mohr 2025-02-17 16:09:18 +01:00
parent bdabafeefd
commit 87b022e48c

View file

@ -182,7 +182,7 @@ class ImportState:
"""
return toppath in self.tagprogress
def progress_reset(self, toppath: PathBytes):
def progress_reset(self, toppath: PathBytes | None):
"""Reset the progress for `toppath`."""
with self as state:
if toppath in state.tagprogress:
@ -1161,7 +1161,7 @@ class SentinelImportTask(ImportTask):
pass
def save_progress(self):
if self.paths is None and self.toppath:
if not self.paths:
# "Done" sentinel.
ImportState().progress_reset(self.toppath)
elif self.toppath: