From a49fd110552a2b7b2af0eb9f33ac9c2adf036e75 Mon Sep 17 00:00:00 2001 From: Russell Keith-Magee Date: Tue, 7 Aug 2007 11:20:15 +0000 Subject: [PATCH] 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 --- django/db/models/fields/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/django/db/models/fields/__init__.py b/django/db/models/fields/__init__.py index b705eac512..a727112b77 100644 --- a/django/db/models/fields/__init__.py +++ b/django/db/models/fields/__init__.py @@ -784,7 +784,7 @@ class FileField(Field): def save_form_data(self, instance, data): if data: - getattr(instance, "save_%s_file" % self.name)(os.path.join(self.upload_to, data.filename), data.content, save=False) + getattr(instance, "save_%s_file" % self.name)(data.filename, data.content, save=False) def formfield(self, **kwargs): defaults = {'form_class': forms.FileField}