Skip to content

Commit a49fd11

Browse files
committed
Removed a redundant directory join during FileField form saving. Thanks to David Danier's eagle eyes for picking up this one.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5826 bcc190cf-cafb-0310-a4f2-bffc1f526a37
1 parent f1edb8c commit a49fd11

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

django/db/models/fields/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -784,7 +784,7 @@ def get_filename(self, filename):
784784

785785
def save_form_data(self, instance, data):
786786
if data:
787-
getattr(instance, "save_%s_file" % self.name)(os.path.join(self.upload_to, data.filename), data.content, save=False)
787+
getattr(instance, "save_%s_file" % self.name)(data.filename, data.content, save=False)
788788

789789
def formfield(self, **kwargs):
790790
defaults = {'form_class': forms.FileField}

0 commit comments

Comments
 (0)