From f50c62ba128949bb9a186eaafdd8cf25e149985f Mon Sep 17 00:00:00 2001 From: Akseli Lahtinen Date: Thu, 5 Jan 2023 16:09:20 +0000 Subject: [PATCH] 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 :) --- src/clipboard.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/clipboard.cpp b/src/clipboard.cpp index 8383af798..8fde7143b 100644 --- a/src/clipboard.cpp +++ b/src/clipboard.cpp @@ -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());