Commits

Sylvain Viollon  committed 2c055ef

Clean paths for Windows.

  • Participants
  • Parent commits 1a5096b

Comments (0)

Files changed (1)

File gp/fileupload/storage.py

 
     if not tempdir:
         tempdir = TEMP_DIR
+    else:
+        tempdir = os.path.normpath(tempdir)
 
     if not upload_to:
         raise ValueError('You must provide an upload directory')
+    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]
 
     return Storage(application, upload_to, tempdir, exclude_paths)