Hello All,
I'm trying to create a directory structure using the following code, but it sometimes fails, I would like to know why?
bool ok = dir.mkpath(path); //this function creates the path, with all its necessary parents;
if(!ok)
{
//error message, could not create the required directory structure!
QMessageBox::critical(this, tr
("Error!"), tr
("Error creating directory structure"));
return;
}
QDir dir;
bool ok = dir.mkpath(path); //this function creates the path, with all its necessary parents;
if(!ok)
{
//error message, could not create the required directory structure!
QMessageBox::critical(this, tr("Error!"), tr("Error creating directory structure"));
return;
}
To copy to clipboard, switch view to plain text mode
How can I get the reason for mkpath returning false, what is the function that I need to call to figure out what was the problem?
Thanks
Bookmarks