summaryrefslogtreecommitdiff
path: root/django/core/files/base.py
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2016-06-18 11:06:10 -0400
committerTim Graham <timograham@gmail.com>2016-06-18 11:06:56 -0400
commitcd217de6100e0101fd921dd18bc2e706bac397c9 (patch)
tree4c5b279e8c7213f0ca6eefd1862ccb97f63309af /django/core/files/base.py
parent625b8e9295d79650208bfb3fca8bf9e6aaf578e4 (diff)
downloaddjango-cd217de6100e0101fd921dd18bc2e706bac397c9.tar.gz
Reverted "Fixed #26644 -- Allowed wrapping NamedTemporaryFile with File."
This reverts commit 1b407050dd53e56686fdd3e168f8cac4f9be8306 as it introduces a regression in the test for refs #26772.
Diffstat (limited to 'django/core/files/base.py')
-rw-r--r--django/core/files/base.py4
1 files changed, 0 insertions, 4 deletions
diff --git a/django/core/files/base.py b/django/core/files/base.py
index 8e974fee57..11049a45de 100644
--- a/django/core/files/base.py
+++ b/django/core/files/base.py
@@ -18,10 +18,6 @@ class File(FileProxyMixin):
self.file = file
if name is None:
name = getattr(file, 'name', None)
- # Use only the basename from a file's name if it's an absolute path,
- # e.g. from NamedTemporaryFile.
- if isinstance(name, six.string_types) and os.path.isabs(name):
- name = os.path.basename(name)
self.name = name
if hasattr(file, 'mode'):
self.mode = file.mode