Browse Source

Don't remove parent directories

QDir::rmpath removes *all* parent directories while QDir::rmdir removes
the specified directory.
adaptive-webui-19844
Chocobo1 6 years ago
parent
commit
4e87aebf55
No known key found for this signature in database
GPG Key ID: 210D9C873253A68C
  1. 2
      src/base/bittorrent/session.cpp

2
src/base/bittorrent/session.cpp

@ -1657,7 +1657,7 @@ bool Session::deleteTorrent(const QString &hash, const bool deleteLocalFiles) @@ -1657,7 +1657,7 @@ bool Session::deleteTorrent(const QString &hash, const bool deleteLocalFiles)
Utils::Fs::forceRemove(unwantedFile);
const QString parentFolder = Utils::Fs::branchPath(unwantedFile);
qDebug("Attempt to remove parent folder (if empty): %s", qUtf8Printable(parentFolder));
QDir().rmpath(parentFolder);
QDir().rmdir(parentFolder);
}
}

Loading…
Cancel
Save