From 781c0004b804b0d272a9da9dea9bc52335bd2653 Mon Sep 17 00:00:00 2001 From: Nicolas Fella Date: Tue, 14 May 2019 20:36:44 +0000 Subject: [PATCH] [kio] Mount device during stat if necessary --- kio/kiokdeconnect.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/kio/kiokdeconnect.cpp b/kio/kiokdeconnect.cpp index 9c85c178c..738b6ad4e 100644 --- a/kio/kiokdeconnect.cpp +++ b/kio/kiokdeconnect.cpp @@ -216,7 +216,14 @@ void KioKdeconnect::stat(const QUrl& url) QString currentDevice = url.host(); if (!currentDevice.isEmpty()) { SftpDbusInterface interface(currentDevice); - entry.insert(KIO::UDSEntry::UDS_LOCAL_PATH, interface.mountPoint()); + + if (interface.isValid()) { + entry.insert(KIO::UDSEntry::UDS_LOCAL_PATH, interface.mountPoint()); + + if (!interface.isMounted()) { + interface.mount(); + } + } } statEntry(entry);