Description

Overview:
The function safe_join() is called throughout the django code base to safely join a base path with other paths inbetween and returns a normalised absolute version of the final path.

Bug:
It calls an underlying function normcase() to normalise the path wich converts the case of the path to all lower case where Python is run in a windows environment. This works all happy chappy where the underlying file system is case insensitive but causes havoc where the underlying file system is actually a mapped network drive.

The solution:
Replacing normcase() with normpath() gives all the usual benefits of normcase() but without the case conversion

More Motivation:
Quite frankly it is a horrible horrible idea for the name under which the field is saved in the database to differ from the name under which it is saved on hard disk. Even on an all Windows setup there could be major headaches where infrastructure want to perhaps move static files onto their own server and decide to use linux to do so.

Plainly put: If the file name is saved as 'uploads/CIMG1335.jpg' in the database then the file name on the hard drive must be exactly uploads/CIMG1335.jpg with the only exception possibly being made that the brackets can be convert to '' when working on the Windows platform.