mirror of
https://github.com/strawberrymusicplayer/strawberry
synced 2025-01-05 21:06:58 +01:00
CoverUtils: Only create path if it doesn't exist
This commit is contained in:
parent
950c236720
commit
b87a950357
@ -21,6 +21,7 @@
|
||||
#include <QString>
|
||||
#include <QRegularExpression>
|
||||
#include <QUrl>
|
||||
#include <QFileInfo>
|
||||
#include <QDir>
|
||||
#include <QStandardPaths>
|
||||
#include <QCryptographicHash>
|
||||
@ -80,7 +81,7 @@ QString CoverUtils::CoverFilePath(const CoverOptions &options, const Song::Sourc
|
||||
}
|
||||
|
||||
QDir dir;
|
||||
if (!dir.mkpath(path)) {
|
||||
if (!QFileInfo::exists(path) && !dir.mkpath(path)) {
|
||||
qLog(Error) << "Unable to create directory" << path;
|
||||
path = QStandardPaths::writableLocation(QStandardPaths::TempLocation);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user