changeset 1016:f9f1170c273e

fix name for root item on mounted backend, no trailing slash!
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sun, 30 Oct 2011 02:36:24 -0200
parents 7d91132e7cdd
children ab22ceb57151 81d30cb55b68 0a17e082460b
files MoinMoin/storage/middleware/routing.py
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/storage/middleware/routing.py	Sat Oct 29 18:53:36 2011 -0200
+++ b/MoinMoin/storage/middleware/routing.py	Sun Oct 30 02:36:24 2011 -0200
@@ -79,7 +79,11 @@
         backend, _, mountpoint = self._get_backend(name)
         meta, data = backend.retrieve(revid)
         if mountpoint:
-            meta[NAME] = u'{0}/{1}'.format(mountpoint, meta[NAME])
+            name = meta[NAME]
+            if name:
+                meta[NAME] = u'{0}/{1}'.format(mountpoint, meta[NAME])
+            else:
+                meta[NAME] = mountpoint # no trailing slash!
         return meta, data
 
     # writing part