Case sensitive pathname in WIndows
-
How can I get the case sensitive pathname of a file in Windows?
If I use QFileInfo.filePath I get the uppercase notation only. -
Hi,
What is the input you are giving to QFileInfo ?
-
Due to vacation just now!
I create a QFileInfo object from a filename supplied by the user.
QFileInfo fi(getFilename(FileKind::Source,i));
I like to have fi.baseName() with the actual case as in the Windows explorer. This filename is used to generate a make file. Make from Mingw is case senstitive.
-
Can you show the code where you ask the file from the user ?
-
The getFilename method extracts the filename from a tree with project files.
To much code to show. The case of the filenames in the tree does not always match the case of the actual filenames. -
Have you tried QFileInfo::canonicalFilePath() ???
-
Yes I tried. That does not get the actual case of the path either.
-
What version of Windows and Qt are you using ?
Can you show an example of original file path and Qt output ?