Anonymous avatar Anonymous committed e19ebdd

Windows fixes

Comments (0)

Files changed (1)

gp/fileupload/upload.py

 
     if not tempdir:
         tempdir = TEMP_DIR
+    else:
+        tempdir = os.path.normpath(tempdir)
 
     if max_size:
         # use Mo
         require_session = False
 
     if upload_to:
+        upload_to = os.path.normpath(upload_to)
         if exclude_paths is None:
             exclude_paths = []
         else:
             if isinstance(exclude_paths, basestring):
-                exclude_paths = [f for f in exclude_paths.split(' ') if f]
+                exclude_paths = [os.path.normpath(f) for f
+                                 in exclude_paths.split(' ') if f]
         application = Storage(
             application, upload_to, tempdir, exclude_paths,
             max_size=max_size, require_session=require_session)
 
     if include_files:
         if isinstance(include_files, basestring):
-            include_files = [f for f in include_files.split(' ') if f]
+            include_files = [os.path.normpath(f) for f
+                             in include_files.split(' ') if f]
         application = ResourceInjection(application, include_files)
 
     return FileUpload(
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.