Skip to content

Commit

Permalink
ensure there's enough space for 2.5 the size of a download, don't det…
Browse files Browse the repository at this point in the history
…ect attribution keys as bids
  • Loading branch information
HamletDuFromage committed Dec 4, 2022
1 parent 6ba1dd7 commit 952a0da
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ DATA := data
INCLUDES := include /lib/borealis/library/include/borealis/extern/nlohmann
APP_TITLE := All-in-One Switch Updater
APP_AUTHOR := HamletDuFromage
APP_VERSION := 2.21.1
APP_VERSION := 2.21.2
TARGET := $(notdir $(CURDIR))

ROMFS := resources
Expand Down
3 changes: 3 additions & 0 deletions source/changelog_page.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,9 @@ ChangelogPage::ChangelogPage() : AppletFrame(true, true)
verTitles.push_back("v2.21.0");
changes.push_back("\uE016 Dialogs now default to not overwriting .ini files");

verTitles.push_back("v2.22.0");
changes.push_back("\uE016 Improved Korean translation.\n\uE016 Be more conversative when checking available space before a download.\n\uE016 Minor fixes.");

for (int i = verTitles.size() - 1; i >= 0; i--) {
listItem = new brls::ListItem(verTitles[i]);
change = changes[i];
Expand Down
4 changes: 2 additions & 2 deletions source/download.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ namespace download {
auto res = curl_easy_getinfo(curl, CURLINFO_CONTENT_LENGTH_DOWNLOAD_T, &dl);
if (!res) {
s64 freeStorage;
if (R_SUCCEEDED(fs::getFreeStorageSD(freeStorage)) && dl * 1.1 > freeStorage) {
if (R_SUCCEEDED(fs::getFreeStorageSD(freeStorage)) && dl * 2.5 > freeStorage) {
return false;
}
}
Expand Down Expand Up @@ -197,7 +197,7 @@ namespace download {

s64 freeStorage;
s64 fileSize = response[0]["s"];
if (R_SUCCEEDED(fs::getFreeStorageSD(freeStorage)) && fileSize * 1.1 > freeStorage)
if (R_SUCCEEDED(fs::getFreeStorageSD(freeStorage)) && fileSize * 2.5 > freeStorage)
return "";

return response[0]["g"];
Expand Down
3 changes: 2 additions & 1 deletion source/download_cheats_page.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,8 @@ DownloadCheatsPage_GbaTemp::DownloadCheatsPage_GbaTemp(uint64_t tid, const std::
else {
std::string versionsWithCheats;
for (auto& [key, val] : cheatsJson.items()) {
versionsWithCheats += key + " ";
if (key != "attribution")
versionsWithCheats += key + " ";
}
ShowCheatsNotFound(versionsWithCheats);
}
Expand Down

0 comments on commit 952a0da

Please sign in to comment.