Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
5.15.0
-
None
-
-
5
-
55ab987c9a518f217c02ca1382656ac97c53b307 (qt/qtbase/dev) 520afbbbee5d5f49badc6dbf982d09ded6661bac (qt/qtbase/6.2)
-
Team 2 Foundation_Sprint 43
Description
Qt does contain special code paths to resolve .lnk files. Anyhow, some of the code also does apply to directories that end with '.lnk', which is dubious.
This shows if you try to list the content of a directory whose name ends with '.lnk' via QDir::entryList, QDir::entryInfoList: Even if a file or sub-directory exists the content will be shown empty:
// create dir QString lnkDirPath = parentDir.absoluteFilePath("foo.lnk"); QDir lnkDir = parentDir.filePath(lnkDirPath); Q_ASSERT(lnkDir.exists()); // create file QFile f(lnkDir.absoluteFilePath("file.txt")); if (!f.open(QIODevice::WriteOnly | QIODevice::Text)) return 1; f.close(); // check if dir lists file auto entryList = lnkDir.entryInfoList(); Q_ASSERT(entryList.size() == 1); // <<<<< asserts Q_ASSERT(entryList.first().fileName() == "file.txt");
I'd expect that directories whose name end with '.lnk' are not treated in any way different than normal directories.
Attachments
Issue Links
- resulted from
-
QTBUG-84980 qmake error if working dir ends with ".lnk"
- Reported