Filenames handling on win32
Submitted by Yevgen Muntyan
Assigned to Alexander Larsson @alexl
Link to original bug (#517086)
Description
At the moment gio doesn't ignore case of filenames, nor does it convert slashes to backslashes in filenames. Attached patch attempts to fix that (and test too). It adds an extra member to GLocalFile structure, 'norm_filename', which is uppercase version of the filename with slashes converted to backslashes. Rationale for this is:
- we got to store user-provided filename, so e.g. if user said to create file "Mama", the case will be preserved;
- we got to store normalized version because otherwise g_local_file_hash(), g_local_file_equal(), g_local_file_contains_file(), and g_local_file_get_relative_path() would need to do case-insensitive string operations on every call.