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:
@@ -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;
|
||||
|
||||
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user