[issue26655] pathlib glob case sensitivity issue on Windows

2016-03-31 Thread SilentGhost
Changes by SilentGhost : -- resolution: -> wont fix stage: -> resolved status: open -> closed ___ Python tracker ___

[issue26655] pathlib glob case sensitivity issue on Windows

2016-03-30 Thread Udo Eberhardt
Udo Eberhardt added the comment: Meanwhile I realized this problem as well. There is no easy solution to determine exact spelling of the entire path. So it seems there is no simple solution to my problem. The concept of treating file system paths case-insensitive (as Windows does) seems to be

[issue26655] pathlib glob case sensitivity issue on Windows

2016-03-30 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: For now glob(r'c:\very\long\case\insensitive\path\*.txt') have to iterate names only in one directory. For restoring actual path case it have to iterate all parent directories: r'c:\very\long\case\insensitive\path', r'c:\very\long\case\insensitive',

[issue26655] pathlib glob case sensitivity issue on Windows

2016-03-29 Thread Udo Eberhardt
Udo Eberhardt added the comment: So this is a trade-off between consistent behavior and efficiency. My point of view is that glob is for enumerating matching files and it should consistently return the real file names. Typically glob will be called with a pattern like '*.txt' and it will have

[issue26655] pathlib glob case sensitivity issue on Windows

2016-03-28 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The problem is that there is no way to just read a file name exactly as it is spelled in the file system. Iterating all names in the directory and finding the one that match specified name ignoring case is not such effective as checking that specified file

[issue26655] pathlib glob case sensitivity issue on Windows

2016-03-28 Thread Udo Eberhardt
New submission from Udo Eberhardt: On Windows Path.glob does not always return the file name with correct case. If the current directory contains a file named MixedCase.txt then the following script: import pathlib p = pathlib.Path('.') print(list(p.glob('*.txt')))