QDir will replace the
"!" with
"..", and next loop will
try to get to the parent folder, instead of continuing the recursion.
QDir will replace the "!" with "..", and next loop will try to get to the parent folder, instead of continuing the recursion.
To copy to clipboard, switch view to plain text mode
Please post a minimal, complete example that reproduces this behaviour.
It clearly doesn't do anything like that here:
#include <QtCore>
#include <QDebug>
int main(int argc, char** argv)
{
dir.cd("a");
qDebug() << "Content of a" << dir.entryList();
dir.cd("!b");
qDebug() << "Content of a/!b" << dir.entryList();
return 0;
}
#include <QtCore>
#include <QDebug>
int main(int argc, char** argv)
{
QCoreApplication app(argc, argv);
QDir dir;
dir.cd("a");
qDebug() << "Content of a" << dir.entryList();
dir.cd("!b");
qDebug() << "Content of a/!b" << dir.entryList();
return 0;
}
To copy to clipboard, switch view to plain text mode
when run:
$ find a
1949745 4 drwxr-xr-x 3 chrisw users 4096 Oct 13 10:01 a
1949748 0 -rw-r--r-- 1 chrisw users 0 Oct 13 10:01 a/afile
1949746 4 drwxr-xr-x 2 chrisw users 4096 Oct 13 10:01 a/!b
1949747 0 -rw-r--r-- 1 chrisw users 0 Oct 13 10:01 a/!b/bfile
$ ./test
Content of a ("!b", ".", "..", "afile")
Content of a/!b (".", "..", "bfile")
$ find a
1949745 4 drwxr-xr-x 3 chrisw users 4096 Oct 13 10:01 a
1949748 0 -rw-r--r-- 1 chrisw users 0 Oct 13 10:01 a/afile
1949746 4 drwxr-xr-x 2 chrisw users 4096 Oct 13 10:01 a/!b
1949747 0 -rw-r--r-- 1 chrisw users 0 Oct 13 10:01 a/!b/bfile
$ ./test
Content of a ("!b", ".", "..", "afile")
Content of a/!b (".", "..", "bfile")
To copy to clipboard, switch view to plain text mode
Bookmarks