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:
Akseli Lahtinen
2023-01-05 16:09:20 +00:00
committed by Tobias Fella
parent 13f05a0995
commit f50c62ba12

View File

@@ -52,8 +52,8 @@ QString Clipboard::saveImage(QString localPath) const
} }
QDir dir; QDir dir;
if (!dir.exists(localPath)) { if (!dir.exists(QFileInfo(url.fileName()).absoluteFilePath())) {
dir.mkpath(localPath); dir.mkpath(QFileInfo(url.fileName()).absoluteFilePath());
} }
image.save(url.toLocalFile()); image.save(url.toLocalFile());