diff --git a/src/plugins/filemanager/core/dfmplugin-titlebar/views/optionbuttonbox.cpp b/src/plugins/filemanager/core/dfmplugin-titlebar/views/optionbuttonbox.cpp index c6f8ad742c..9281ea7d61 100644 --- a/src/plugins/filemanager/core/dfmplugin-titlebar/views/optionbuttonbox.cpp +++ b/src/plugins/filemanager/core/dfmplugin-titlebar/views/optionbuttonbox.cpp @@ -45,8 +45,9 @@ void OptionButtonBoxPrivate::setViewMode(ViewMode mode) void OptionButtonBoxPrivate::loadViewMode(const QUrl &url) { - auto defaultViewMode = static_cast(TitleBarEventCaller::sendGetDefualtViewMode(url.scheme())); - auto viewMode = static_cast(Application::appObtuselySetting()->value("FileViewState", url).toMap().value("viewMode", defaultViewMode).toInt()); + QUrl tmpUrl = url.adjusted(QUrl::RemoveQuery); + auto defaultViewMode = static_cast(TitleBarEventCaller::sendGetDefualtViewMode(tmpUrl.scheme())); + auto viewMode = static_cast(Application::appObtuselySetting()->value("FileViewState", tmpUrl).toMap().value("viewMode", defaultViewMode).toInt()); switchMode(viewMode); } diff --git a/src/plugins/filemanager/dfmplugin-search/menus/searchmenuscene.cpp b/src/plugins/filemanager/dfmplugin-search/menus/searchmenuscene.cpp index ea64ed16e1..f3a0b37e24 100644 --- a/src/plugins/filemanager/dfmplugin-search/menus/searchmenuscene.cpp +++ b/src/plugins/filemanager/dfmplugin-search/menus/searchmenuscene.cpp @@ -187,7 +187,8 @@ bool SearchMenuScene::initialize(const QVariantHash ¶ms) QVariantHash tmpParams = params; QList currentScene; const auto &targetUrl = SearchHelper::searchTargetUrl(d->currentDir); - auto menuScene = dpfSlotChannel->push("dfmplugin_workspace", "slot_FindMenuScene", targetUrl.scheme()).toString(); + const auto &scheme = targetUrl.scheme() == Global::Scheme::kComputer ? Global::Scheme::kFile : targetUrl.scheme(); + auto menuScene = dpfSlotChannel->push("dfmplugin_workspace", "slot_FindMenuScene", scheme).toString(); if (auto scene = dfmplugin_menu_util::menuSceneCreateScene(menuScene)) { currentScene.append(scene); tmpParams[MenuParamKey::kCurrentDir] = targetUrl;