Check that Qt version is higher than 5.9 to use QDir::isEmpty()
This commit is contained in:
@@ -74,11 +74,13 @@ bool FilesystemMusicStorage::CopyToStorage(const CopyJob &job) {
|
||||
QFile::rename(cover_src.absoluteFilePath(), cover_dest.absoluteFilePath());
|
||||
}
|
||||
// Remove empty directories.
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(5, 9, 0))
|
||||
QDir remove_dir(src.absolutePath(), QString(), QDir::Name, QDir::NoDotAndDotDot);
|
||||
while (remove_dir.isEmpty()) {
|
||||
if (!QDir().rmdir(remove_dir.absolutePath())) break;
|
||||
remove_dir.cdUp();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
else {
|
||||
if (!dest.exists()) {
|
||||
|
||||
Reference in New Issue
Block a user