Use local file path instead of url
If the localFile url is used, it creates a folder called `file:` in the home folder. So get filepath from url instead :)
This commit is contained in:
committed by
Tobias Fella
parent
13f05a0995
commit
f50c62ba12
@@ -52,8 +52,8 @@ QString Clipboard::saveImage(QString localPath) const
|
||||
}
|
||||
|
||||
QDir dir;
|
||||
if (!dir.exists(localPath)) {
|
||||
dir.mkpath(localPath);
|
||||
if (!dir.exists(QFileInfo(url.fileName()).absoluteFilePath())) {
|
||||
dir.mkpath(QFileInfo(url.fileName()).absoluteFilePath());
|
||||
}
|
||||
|
||||
image.save(url.toLocalFile());
|
||||
|
||||
Reference in New Issue
Block a user