Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

[1.0.X] Fixed #11030: fixed file uploads on non-utf8 filesystem encod…

…ing. Thanks, Honza Kral. Backport of [10693] from trunk.

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10695 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 09c2559b4193992f6ba29f033052b81c87f4f2f0 1 parent b03e58b
Jacob Kaplan-Moss authored May 07, 2009

Showing 1 changed file with 2 additions and 2 deletions. Show diff stats Hide diff stats

  1. 4  django/core/files/storage.py
4  django/core/files/storage.py
@@ -6,7 +6,7 @@
6 6
 from django.core.exceptions import ImproperlyConfigured, SuspiciousOperation
7 7
 from django.core.files import locks, File
8 8
 from django.core.files.move import file_move_safe
9  
-from django.utils.encoding import force_unicode
  9
+from django.utils.encoding import force_unicode, smart_str
10 10
 from django.utils.functional import LazyObject
11 11
 from django.utils.text import get_valid_filename
12 12
 from django.utils._os import safe_join
@@ -211,7 +211,7 @@ def path(self, name):
211 211
             path = safe_join(self.location, name)
212 212
         except ValueError:
213 213
             raise SuspiciousOperation("Attempted access to '%s' denied." % name)
214  
-        return os.path.normpath(path)
  214
+        return smart_str(os.path.normpath(path))
215 215
 
216 216
     def size(self, name):
217 217
         return os.path.getsize(self.path(name))

0 notes on commit 09c2559

Please sign in to comment.
Something went wrong with that request. Please try again.