FilesystemMusicStorage: QFile::moveToTrash recursively moves files to trash

This commit is contained in:
Jonas Kvinge
2022-12-27 20:59:09 +01:00
parent efa979ee03
commit fee63891ac
3 changed files with 1 additions and 33 deletions

View File

@@ -106,12 +106,7 @@ bool FilesystemMusicStorage::DeleteFromStorage(const DeleteJob &job) {
if (job.use_trash_) {
#if QT_VERSION >= QT_VERSION_CHECK(5, 15, 0)
if (fileInfo.isDir()) {
return Utilities::MoveToTrashRecursive(path);
}
else {
return QFile::moveToTrash(path);
}
return QFile::moveToTrash(path);
#else
return false;
#endif