Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
5.4.0, 5.12.3
-
None
-
Linux; macOS
-
bd55a9d91227d1ac38f51b21ca23dec7fa5e82af (qt/qtbase/5.13)
Description
When a QFileInfo object is constructed with a path that points to a file but has trailing slashes exists() returns false, but canonicalFilePath() returns the path with the trailing slashes instead of a empty string.
This can be seen in the attached testcase:
/usr/bin/ls: exists true, canonical "/usr/bin/ls"
/usr/bin/ls/: exists false, canonical "/usr/bin/ls/"
/usr/bin/ls///: exists false, canonical "/usr/bin/ls///"
/usr/bin/doesnotexist: exists false, canonical ""
Attachments
For Gerrit Dashboard: QTBUG-44242 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
262391,3 | Fix canonicalFilePath() for files with trailing slashes | 5.13 | qt/qtbase | Status: MERGED | +2 | 0 |