diff MoinMoin/action/AttachFile.py @ 145:b11bb396654e

make Attachment fix run with Py 2.3 imported from: moin--main--1.5--patch-147
author Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
date Thu, 27 Oct 2005 12:11:37 +0000
parents 11df1156d432
children 015c945277ec
line wrap: on
line diff
--- a/MoinMoin/action/AttachFile.py	Thu Oct 27 11:46:33 2005 +0000
+++ b/MoinMoin/action/AttachFile.py	Thu Oct 27 12:11:37 2005 +0000
@@ -68,12 +68,11 @@
     """ Get (pagename, filename) of an atatchment: link
     """
 
-    pieces = url.rsplit('/', 1)
+    pieces = url.split('/')
     if len(pieces)==1:
         return pagename, pieces[0]
     else:
-        print pieces
-        return pieces[0], pieces[1]
+        return u"/".join(pieces[:-1]), pieces[-1]
 
 def getAttachUrl(pagename, filename, request, addts=0, escaped=0):
     """ Get URL that points to attachment `filename` of page `pagename`.