Commits

Anonymous committed 99508a5 Merge

Merge main

  • Participants
  • Parent commits bad12e3, 1cce2fc

Comments (0)

Files changed (1)

         if name.startswith('_') and len(name) > 1:
             name = name[1:]
         if self.extension and name.endswith(self.extension):
-            name = name[:len(self.extension)]
+            name = name[:-len(self.extension)]
         return werkzeug.url_unquote(name)
 
     def __contains__(self, title):
 
         for filename in os.listdir(self.path):
             file_path = os.path.join(self.path, filename)
+            file_repopath = os.path.join(self.repo_prefix, filename)
             if (os.path.isfile(file_path)
                 and not os.path.islink(file_path)
                 and not filename.startswith('.')):
-                yield werkzeug.url_unquote(filename)
+                yield self._file_to_title(file_repopath)
 
     def changed_since(self, rev):
         """
         for (dirpath, dirnames, filenames) in os.walk(self.path):
             path = dirpath[len(self.path) + 1:]
             for name in filenames:
-                if os.path.basename(name) == self.index:
-                    filename = os.path.join(path, os.path.dirname(name))
-                    yield werkzeug.url_unquote(filename)
-                else:
-                    filename = os.path.join(path, name)
-                    if (os.path.isfile(os.path.join(self.path, filename))
-                        and not filename.startswith('.')):
-                        yield werkzeug.url_unquote(filename)
+                filepath = os.path.join(dirpath, name)
+                repopath = os.path.join(self.repo_prefix, path, name)
+                if (os.path.isfile(filepath)
+                    and not name.startswith('.')):
+                    yield self._file_to_title(repopath)