Commit 690221d8 authored by Harald Sitter's avatar Harald Sitter 🏳️‍🌈
Browse files

don't go to root on windows

conceptually it may mean the computer view, in practise for us it means
nothing and fails to open. don't go beyond the current drive in the url

BUG: 457298
parent 36bb3f09
Pipeline #213958 passed with stage
in 2 minutes and 29 seconds
......@@ -139,7 +139,14 @@ void MainContext::slotScanRootFolder()
void MainContext::slotUp()
{
slotScanUrl(KIO::upUrl(url()));
const auto downUrl = url();
auto upUrl = KIO::upUrl(downUrl);
#ifdef Q_OS_WINDOWS
if (upUrl.path() == QLatin1Char('/')) { // root means nothing on windows
upUrl = downUrl;
}
#endif
slotScanUrl(upUrl);
}
bool MainContext::slotScanPath(const QString &path)
......
Supports Markdown
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