diff options
| author | Karen Tracey <kmtracey@gmail.com> | 2010-03-02 21:58:49 +0000 |
|---|---|---|
| committer | Karen Tracey <kmtracey@gmail.com> | 2010-03-02 21:58:49 +0000 |
| commit | 600aa6679ed98d132fc378dfa205f482a58cceb1 (patch) | |
| tree | 32972df3d186cd45ff7112db4a2af2885ae96e83 /django | |
| parent | 125c748cf6d59012ac6c9e6935d7692f615d0e14 (diff) | |
Fixed #11030: Reverted a change that assumed the file system encoding was utf8, and changed a test to demonstrate how that assumption corrupted uploaded non-ASCII file names on systems that don't use utf8 as their file system encoding (Windows for one, specifically). Thanks for the report to vrehak.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12661 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django')
| -rw-r--r-- | django/core/files/storage.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/django/core/files/storage.py b/django/core/files/storage.py index d312681c28..4f27502167 100644 --- a/django/core/files/storage.py +++ b/django/core/files/storage.py @@ -7,7 +7,7 @@ from django.conf import settings from django.core.exceptions import ImproperlyConfigured, SuspiciousOperation from django.core.files import locks, File from django.core.files.move import file_move_safe -from django.utils.encoding import force_unicode, smart_str +from django.utils.encoding import force_unicode from django.utils.functional import LazyObject from django.utils.importlib import import_module from django.utils.text import get_valid_filename @@ -210,7 +210,7 @@ class FileSystemStorage(Storage): path = safe_join(self.location, name) except ValueError: raise SuspiciousOperation("Attempted access to '%s' denied." % name) - return smart_str(os.path.normpath(path)) + return os.path.normpath(path) def size(self, name): return os.path.getsize(self.path(name)) |
