Browse files

Fixed #2923: FileFields can now be modified on windows. Thanks, radek.

git-svn-id: bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
1 parent 4d59730 commit a4d86a7fb09e19779ea87ef0c29d0a85abade260 @jacobian jacobian committed Nov 7, 2006
Showing with 1 addition and 1 deletion.
  1. +1 −1 django/db/models/fields/
@@ -585,7 +585,7 @@ def __call__(self, field_data, all_data):
# If the raw path is passed in, validate it's under the MEDIA_ROOT.
def isWithinMediaRoot(field_data, all_data):
f = os.path.abspath(os.path.join(settings.MEDIA_ROOT, field_data))
- if not f.startswith(os.path.normpath(settings.MEDIA_ROOT)):
+ if not f.startswith(os.path.abspath(os.path.normpath(settings.MEDIA_ROOT))):
raise validators.ValidationError, _("Enter a valid filename.")
return field_list

0 comments on commit a4d86a7

Please sign in to comment.