django-imagekit
django-imagekit copied to clipboard
Fix equality checking of paths by normalizing them
The main reason for this PR is the final part of the FileSystemStorage._save() method in the Django library that leads to generating unnormalized paths:
...
# Store filenames with forward slashes, even on Windows.
return str(name).replace('\\', '/')
So, we should care for the normalized paths generated by namer (using os.path.normpath()) against the unnormalized paths generated by Django Storage. Hence, this leads to a fault when the OS doesn't use forward slashes for the path formatting, like Windows.