diff --git a/krusader/Panel/panelfunc.cpp b/krusader/Panel/panelfunc.cpp --- a/krusader/Panel/panelfunc.cpp +++ b/krusader/Panel/panelfunc.cpp @@ -486,19 +486,24 @@ editPath = files()->getUrl(name); } - const KFileItem fileToEdit = KFileItem(filePath); + if (editPath.isLocalFile()) { + const KFileItem fileToEdit = KFileItem(editPath); - if (fileToEdit.isDir()) { - KMessageBox::sorry(krMainWindow, i18n("You cannot edit a folder")); - return; - } + if (fileToEdit.isDir()) { + KMessageBox::sorry(krMainWindow, i18n("You cannot edit a folder")); + return; + } - if (!fileToEdit.isReadable()) { - KMessageBox::sorry(nullptr, i18n("No permissions to edit this file.")); - return; - } + if (!fileToEdit.isReadable()) { + KMessageBox::sorry(nullptr, i18n("No permissions to edit this file.")); + return; + } - KrViewer::edit(editPath); + KrViewer::edit(editPath); + } else { + KIO::StatJob* statJob = KIO::stat(editPath, KIO::HideProgressInfo); + connect(statJob, &KIO::StatJob::result, this, &ListPanelFunc::slotStatEdit); + } } void ListPanelFunc::askEditFile()