Details
Description
When using QDir::cleanPath() with path having '.' and '..' in combination with '/' it does not work consistent.
#include <QtCore> int main (int argc, char *argv[]) { QCoreApplication app (argc, argv); QString path ="/GeneratedFiles/./and"; qDebug()<<QDir::cleanPath(path); path ="./GeneratedFiles/.."; qDebug()<<QDir::cleanPath(path);// prints "./GeneratedFiles/.."; path ="./GeneratedFiles/../"; qDebug()<<QDir::cleanPath(path);// prints ""; return app.exec (); }
Reproducible with Qt 4.4.3 and 4.5 beta on Window Vista.
Attachments
Issue Links
- is duplicated by
-
QTBUG-23892 QDir::cleanPath of "dir/.." is wrong.
- Closed