comment on path_index() fragility

This commit is contained in:
AJ Slater 2024-02-23 17:52:25 -08:00
parent 51cb5eac7e
commit e15feb587d

View File

@ -48,8 +48,8 @@ class ComicFilenameParser:
if not value: if not value:
return -1 return -1
if value not in self._path_indexes: if value not in self._path_indexes:
# TODO This is fragile. # XXX This is fragile, but it's difficult to calculate the original
# Can I get it at match time? # position at match time from the ever changing _unparsed_path.
if key == "ext": if key == "ext":
index = self.path.rfind(value) index = self.path.rfind(value)
else: else: