mgood/flask-debugtoolbar — pull request #68 by DiegoYungh (2014-03-20 03:02:13+00:00)
Title: fix: #67

Basically os.path.commonprefix fails to compare paths with difference on their casing.

'C:\\aaa\\bbbb\\ccc\\ddd' fails when comparing commonprefix with 'C:\\Aaa\\Bbb\\Ccc\\Ddd'

Output example of sys.path on Windows 7 64b:

['',
'C:\\bin\\Python27\\lib\\site-packages\\pillow-2.0.0-py2.7-win32.egg',
'C:\\bin\\Python27\\lib\\site-packages\\pil-1.1.7-py2.7-win32.egg',
'C:\\bin\\Python27\\lib\\site-packages\\setuptools-2.2-py2.7.egg',
'C:\\bin\\Python27\\lib\\site-packages\\mechanize-0.2.5-py2.7.egg',
'C:\\bin\\Python27\\lib\\site-packages\\lxml-3.3.1-py2.7-win32.egg',
'C:\\bin\\Python27\\lib\\site-packages\\distribute-0.6.49-py2.7.egg',
'C:\\bin\\Python27\\lib\\site-packages\\sqlalchemy-0.9.3-py2.7-win32.egg',
'C:\\bin\\Python27\\DLLs',
'C:\\bin\\Python27\\lib',
'C:\\bin\\Python27\\lib\\plat-win',
'C:\\bin\\Python27\\lib\\lib-tk',
'C:\\bin\\Python27',
'C:\\bin\\Python27\\lib\\site-packages']

Comparison:

- Agains't **'c:\\bin\\python27\\'** => []
- Agains't **'c:\\bin\Python27\\'** => []
- Agains't **'C:\\bin\\Python27\\'** => ['',
'C:\\bin\\Python27\\',
'C:\\bin\\Python27\\',
'C:\\bin\\Python27\\',
'C:\\bin\\Python27\\',
'C:\\bin\\Python27\\',
'C:\\bin\\Python27\\',
'C:\\bin\\Python27\\',
'C:\\bin\\Python27\\',
'C:\\bin\\Python27\\',
'C:\\bin\\Python27\\',
'C:\\bin\\Python27\\',
'C:\\bin\\Python27',
'C:\\bin\\Python27\\']

This way you can imagine the impact the missing **.lower()** would make on windows