changeset 3085:fdb68a8f92da

fix wrong pagename when creating new pages on Mac OS X (ported from 1.6)
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sat, 23 Feb 2008 00:28:53 +0100
parents a6aaae4bded0
children dafb1b4e75e5
files MoinMoin/Page.py
diffstat 1 files changed, 8 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/Page.py	Sat Jan 12 18:17:13 2008 +0100
+++ b/MoinMoin/Page.py	Sat Feb 23 00:28:53 2008 +0100
@@ -338,7 +338,7 @@
 
         Correct the case of the page name. Elements created from the
         page name in reset() are not updated because it's too messy, and
-        this fix seems to be enough for 1.3.
+        this fix seems to be enough for now.
 
         Problems to fix later:
 
@@ -347,10 +347,13 @@
 
         @param pagedir: the storage path to the page directory
         """
-        realPath = util.filesys.realPathCase(pagedir)
-        if not realPath is None:
-            realPath = wikiutil.unquoteWikiname(realPath)
-            self.page_name = realPath[-len(self.page_name):]
+        if self._text_filename_force is None:
+            # we only do this for normal pages, but not for the MissingPage,
+            # because the code below is wrong in that case
+            realPath = util.filesys.realPathCase(pagedir)
+            if realPath is not None:
+                realPath = wikiutil.unquoteWikiname(realPath)
+                self.page_name = realPath[-len(self.page_name):]
 
     def get_rev(self, use_underlay=-1, rev=0):
         """ Get information about a revision.