]> git.scottworley.com Git - paperdoorknob/commitdiff
LaTeX doesn't like % in filenames
authorScott Worley <scottworley@scottworley.com>
Wed, 20 Dec 2023 23:57:46 +0000 (15:57 -0800)
committerScott Worley <scottworley@scottworley.com>
Wed, 20 Dec 2023 23:57:46 +0000 (15:57 -0800)
images.py

index d9926a3c1387b072919855b3c78d9bc023a8e719..68a96964e2dd70d0ea57b7547481507337bfe538 100644 (file)
--- a/images.py
+++ b/images.py
@@ -32,7 +32,7 @@ class DiskImageStore(ImageStore):
 
     def _filename(self, url: str) -> str:
         assert url not in self._images
 
     def _filename(self, url: str) -> str:
         assert url not in self._images
-        base = os.path.basename(url)
+        base = os.path.basename(url).replace('%', '')
         if base not in self._filenames:
             return base
         stem, ext = os.path.splitext(base)
         if base not in self._filenames:
             return base
         stem, ext = os.path.splitext(base)