Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/hatta
diff options
context:
space:
mode:
authorAmit Aronovitch <amit.aronovitch@takadu.com>2011-07-09 21:34:45 (GMT)
committer Amit Aronovitch <amit.aronovitch@takadu.com>2011-07-09 21:34:45 (GMT)
commitfb8402416007dcfba7dc6a955088e8e498108405 (patch)
treebe2c817eaae39790d3a5f3dbbf78edf36826d1f3 /hatta
parentb19dcf29aef5c6fae6f5e228a26770938cf63e29 (diff)
fix all_pages to handle extensions (-E)
Diffstat (limited to 'hatta')
-rw-r--r--hatta/storage.py16
1 files changed, 7 insertions, 9 deletions
diff --git a/hatta/storage.py b/hatta/storage.py
index 9d6e3b6..f1f2ee8 100644
--- a/hatta/storage.py
+++ b/hatta/storage.py
@@ -439,10 +439,11 @@ class WikiStorage(object):
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):
"""
@@ -578,11 +579,8 @@ class WikiSubdirectoryStorage(WikiStorage):
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)