mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-11-23 15:46:18 +00:00
Changed: Only remove directories if not empty path
This commit is contained in:
parent
092b4593f3
commit
a137f542c8
1 changed files with 16 additions and 8 deletions
|
@ -722,12 +722,15 @@ void COperationDialog::deleteComponentsServers()
|
||||||
|
|
||||||
QString path = server.getDirectory();
|
QString path = server.getDirectory();
|
||||||
|
|
||||||
QDir dir(path);
|
if (!path.isEmpty())
|
||||||
|
|
||||||
if (dir.exists() && !dir.removeRecursively())
|
|
||||||
{
|
{
|
||||||
emit fail(tr("Unable to delete files for client %1").arg(server.name));
|
QDir dir(path);
|
||||||
return;
|
|
||||||
|
if (dir.exists() && !dir.removeRecursively())
|
||||||
|
{
|
||||||
|
emit fail(tr("Unable to delete files for client %1").arg(server.name));
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -761,10 +764,15 @@ void COperationDialog::deleteComponentsProfiles()
|
||||||
|
|
||||||
QString path = profile.getDirectory();
|
QString path = profile.getDirectory();
|
||||||
|
|
||||||
if (dir.exists() && !dir.removeRecursively())
|
if (!path.isEmpty())
|
||||||
{
|
{
|
||||||
emit fail(tr("Unable to delete files for profile %1").arg(profile.name));
|
QDir dir(path);
|
||||||
return;
|
|
||||||
|
if (dir.exists() && !dir.removeRecursively())
|
||||||
|
{
|
||||||
|
emit fail(tr("Unable to delete files for profile %1").arg(profile.name));
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// delete profile
|
// delete profile
|
||||||
|
|
Loading…
Reference in a new issue