devoptab: only push popuplist if the items array is non-empty. curl: guess the url scheme rather than force https.

This commit is contained in:
ITotalJustice
2025-09-14 15:14:35 +01:00
parent c05ce5eff4
commit 9fe0044a65
2 changed files with 11 additions and 1 deletions

View File

@@ -258,6 +258,11 @@ void DisplayDevoptabSideBar() {
items.emplace_back(GetTypeName(e));
}
if (items.empty()) {
App::Notify("No mount entries found."_i18n);
return;
}
App::Push<PopupList>("Modify Entry"_i18n, items, [configs](std::optional<s64> 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<PopupList>("Delete Entry"_i18n, items, [configs](std::optional<s64> index){
if (!index.has_value()) {
return;

View File

@@ -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));