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.
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:So, we should care for the normalized paths generated by
namer
(usingos.path.normpath()
) against the unnormalized paths generated by DjangoStorage
. Hence, this leads to a fault when the OS doesn't use forward slashes for the path formatting, like Windows.