From 51e4e399f4d44889741fc76f93363465f315bbd3 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 1b082a2ad..c381d69e7 100644 --- a/kio/kiokdeconnect.cpp +++ b/kio/kiokdeconnect.cpp @@ -250,7 +250,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);