I’m using the following code to delete an empty folder on Linux:
bool removeFolder (const QString& path)
{
QDir dir(path);
assert(dir.exists());
return dir.rmdir(".");
}
For some reason it sometimes returns false (for specific folders, but those folders don’t seem to be wrong in any way). If I subsequently use ::rmdir from <unistd.h>
to remove the same folder, it succeeds.
How can I tell why QDir::rmdir
is failing?
This never happened on Windows so far, QDir::rmdir
just works.