Image path bug on Windows platforms..

Issue #1103 resolved
utku karatas
created an issue

In satchmo_utils.thumbnail.utils.rename_by_field function the path names are not case-normalized and this results in a miss at " path.startswith(media_root)" check (ie. when the //media_root// starts with "c:\xxx" and the //path// starts with "C:\xxx").

Please change the declaration block at the top with this :

{{{ old_name = os.path.normcase(os.path.basename(file_path)) path = os.path.normcase(os.path.normpath(file_path)) media_root = os.path.normcase(os.path.normpath(settings.MEDIA_ROOT)) }}}

Comments (3)

  1. Log in to comment