Commit 896751ef authored by Charles Vejnar's avatar Charles Vejnar

Patch for Bug 408174. Kate opens non-existing remote folder.

parent 92dc0dc9
......@@ -229,7 +229,13 @@ void KateViewManager::slotDocumentOpen()
} else {
startUrl = m_lastOpenDialogUrl;
}
const QList<QUrl> urls = QFileDialog::getOpenFileUrls(m_mainWindow, i18n("Open File"), startUrl);
// if file is not local, then remove filename from url
QList<QUrl> urls;
if (startUrl.isLocalFile()) {
urls = QFileDialog::getOpenFileUrls(m_mainWindow, i18n("Open File"), startUrl);
} else {
urls = QFileDialog::getOpenFileUrls(m_mainWindow, i18n("Open File"), startUrl.adjusted(QUrl::RemoveFilename));
}
/**
* emit size warning, for local files
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment