[network/kdeconnect-kde/release/26.08] plugins/clipboard: Fix clipboard plugin trying to share directories

Albert Vaca Cintora <[email protected]>
Newsgroups gmane.comp.kde.cvs
Message-ID <[email protected]>
Git commit 18ac37df15bcbb93a670b6c0508cb9d5a9e6409b by Albert Vaca Cintora.
Committed on 15/08/2026 at 10:11.
Pushed by albertvaka into branch 'release/26.08'.

Fix clipboard plugin trying to share directories

(cherry picked from commit e2a0669f62f552118249ec52088969da73b7768f)

M  +2    -1    plugins/clipboard/clipboardplugin.cpp

https://invent.kde.org/network/kdeconnect-kde/-/commit/18ac37df15bcbb93a670b6c0508cb9d5a9e6409b

diff --git a/plugins/clipboard/clipboardplugin.cpp b/plugins/clipboard/clipboardplugin.cpp
index f407af702..a33430cb2 100644
--- a/plugins/clipboard/clipboardplugin.cpp
+++ b/plugins/clipboard/clipboardplugin.cpp
@@ -14,6 +14,7 @@
 #include <KPluginFactory>
 #include <QBuffer>
 #include <QEventLoop>
+#include <QFileInfo>
 #include <QImage>
 #include <QMimeType>
 #include <QObject>
@@ -93,7 +94,7 @@ void ClipboardPlugin::sendClipboard(const QVariant &content)
 
         qCDebug(KDECONNECT_PLUGIN_CLIPBOARD) << fileSize << " " << configSize;
 
-        if (!ioFile->exists()) {
+        if (!QFileInfo(*ioFile).isFile()) {
             qCDebug(KDECONNECT_PLUGIN_CLIPBOARD) << "Could not open file " << url.toDisplayString();
             return;
         } else if (fileSize > configSize) {
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.