Priority: P2: Important
Affects Version/s: 5.5.1
Fix Version/s: None
Component/s: Core: Filesystem watching
Environment:OSX 10.10.5 Qt 5.5.1 from git
- Create a directory containing the ä character and run the program below:
- Add/remove files into/from the created folder
- You will not see "dir changed:" printed on modification
The folder path is added to the watcher's internal hash with one encoding (using QString::fromLocal8Bit), but when a change occurs, the folder to query is with different encoding (using QFile::decodeName), thus the hash fails to find a match as if the folder is not monitored at all.
None! Even if someone adds a string with an explicit QFile::decodeName encoding, the string is always first "converted" by a QString::fromLocal8Bit call.
The path added must be with the exact same encoding as the one that is queried later.
We must either fixup QFseventsFileSystemWatcherEngine::addPaths to explicitly store a QFile::decodeName path
Fix FileSystemEngine::canonicalName (used by QFileInfo::canonicalFilePath, used by QFseventsFileSystemWatcherEngine::addPaths) to use QFile::decodeName instead QString::fromLocal8Bit:
Question: What is the difference b/w QString::fromLocal8Bit and QFile::decodeName? To what extend are interchangeable?