Details
-
Bug
-
Resolution: Fixed
-
P2: Important
-
6.7.2
-
-
329b05739 (dev), 23cf29ffd (6.8), de6a28f04 (6.7), 1fdd53195 (tqtc/lts-6.5)
Description
Strangely QFileinfo::isSymLink() seems like only checks if the file name has .lnk , this does not seems to be checking if path really exists or file really there.
QString symlinkPath = "blablabla\\multipage.lnk"; QFileInfo symlinkInfo(symlinkPath); if (symlinkInfo.isSymLink()) { qDebug() << "The symlink file itself exists."; } else { qDebug() << "The symlink file does not exist."; }
This will return true and you will get ouput
"The symlink file itself exists."
Fact is the path is just garbage.
Also there does not seems any way to check if given symlink file exists or not irrespective if Target of symlink exists or not.