﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
9442	django/utils/os_py -> safe_join converts file name to lower case when it is a bad idea and this causes incompatibilities with windows / linux	dawidjoubert	nobody	"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.

My recommendation:
Replace normcase() with normpath() in django.utils._os.py"		closed	File uploads/storage	1.0		duplicate			Unreviewed	0	0	0	0	0	0
