From 9fe0044a65a2cf5999ce12c967f68d22c3e826ab Mon Sep 17 00:00:00 2001 From: ITotalJustice <47043333+ITotalJustice@users.noreply.github.com> Date: Sun, 14 Sep 2025 15:14:35 +0100 Subject: [PATCH] devoptab: only push popuplist if the items array is non-empty. curl: guess the url scheme rather than force https. --- sphaira/source/utils/devoptab.cpp | 10 ++++++++++ sphaira/source/utils/devoptab_common.cpp | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/sphaira/source/utils/devoptab.cpp b/sphaira/source/utils/devoptab.cpp index 6ba4108..2adffa0 100644 --- a/sphaira/source/utils/devoptab.cpp +++ b/sphaira/source/utils/devoptab.cpp @@ -258,6 +258,11 @@ void DisplayDevoptabSideBar() { items.emplace_back(GetTypeName(e)); } + if (items.empty()) { + App::Notify("No mount entries found."_i18n); + return; + } + App::Push("Modify Entry"_i18n, items, [configs](std::optional index){ if (!index.has_value()) { return; @@ -278,6 +283,11 @@ void DisplayDevoptabSideBar() { items.emplace_back(GetTypeName(e)); } + if (items.empty()) { + App::Notify("No mount entries found."_i18n); + return; + } + App::Push("Delete Entry"_i18n, items, [configs](std::optional index){ if (!index.has_value()) { return; diff --git a/sphaira/source/utils/devoptab_common.cpp b/sphaira/source/utils/devoptab_common.cpp index 6d9ad7f..ed63809 100644 --- a/sphaira/source/utils/devoptab_common.cpp +++ b/sphaira/source/utils/devoptab_common.cpp @@ -1188,7 +1188,7 @@ bool MountCurlDevice::Mount() { log_write("[CURL] updated host: %s\n", url.c_str()); } - const auto flags = CURLU_DEFAULT_SCHEME|CURLU_URLENCODE; + const auto flags = CURLU_GUESS_SCHEME|CURLU_URLENCODE; CURLUcode rc = curl_url_set(curlu, CURLUPART_URL, url.c_str(), flags); if (rc != CURLUE_OK) { log_write("[CURL] curl_url_set() failed: %s\n", curl_url_strerror_wrap(rc));