changeset 4650:e673b8b21dc2

remove unneeded code: the filename we get from werkzeug is already preprocessed to fix IE bugs
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sat, 14 Mar 2009 17:27:56 +0100
parents 268004c7b206
children aa481a3b6a60
files MoinMoin/action/AttachFile.py MoinMoin/action/Load.py
diffstat 2 files changed, 0 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/action/AttachFile.py	Sat Mar 14 17:02:31 2009 +0100
+++ b/MoinMoin/action/AttachFile.py	Sat Mar 14 17:27:56 2009 +0100
@@ -527,17 +527,6 @@
     request.theme.send_closing_html()
 
 
-def preprocess_filename(filename):
-    """ preprocess the filename we got from upload form,
-        strip leading drive and path (IE misbehaviour)
-    """
-    if filename and len(filename) > 1 and (filename[1] == ':' or filename[0] == '\\'): # C:.... or \path... or \\server\...
-        bsindex = filename.rfind('\\')
-        if bsindex >= 0:
-            filename = filename[bsindex+1:]
-    return filename
-
-
 def _do_upload(pagename, request):
     _ = request.getText
     # Currently we only check TextCha for upload (this is what spammers ususally do),
--- a/MoinMoin/action/Load.py	Sat Mar 14 17:02:31 2009 +0100
+++ b/MoinMoin/action/Load.py	Sat Mar 14 17:27:56 2009 +0100
@@ -52,7 +52,6 @@
         else:
             target = filename
 
-        target = AttachFile.preprocess_filename(target)
         target = wikiutil.clean_input(target)
 
         if target: