[kio] Mount device during stat if necessary

This commit is contained in:
Nicolas Fella 2019-05-14 20:36:44 +00:00
parent c029ae2bc2
commit 51e4e399f4

View file

@ -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);