I've found a pragmatic solution:
- basically use the absolute path of files and directories
- normalize it by using QDir::cleanPath()
- use the canonical path only for security tokens
This strategy preserves symlinks, while redundant parts of the path are removed. The corresponding static functions will be located in MFile and MDir. All invocations of QDir::absolutePath(), QFileInfo::absolutePath(), and QFileInfo::absoluteFilePath() will be replace by MDir::normalizedPath(), MFile::normalizedPath(), and MFile::normalizedFilePath() respectively.
PR will follow shortly. I've prepared a branch for 1.12, but rebasing it on master would also be possible.
I've found a pragmatic solution:
- basically use the absolute path of files and directories
- normalize it by using QDir::cleanPath()
- use the canonical path only for security tokens
This strategy preserves symlinks, while redundant parts of the path are removed. The corresponding static functions will be located in MFile and MDir. All invocations of QDir::absoluteP ath(), QFileInfo: :absolutePath( ), and QFileInfo: :absoluteFilePa th() will be replace by MDir::normalize dPath() , MFile:: normalizedPath( ), and MFile:: normalizedFileP ath() respectively.
PR will follow shortly. I've prepared a branch for 1.12, but rebasing it on master would also be possible.