Skip to content
This repository has been archived by the owner on Aug 1, 2022. It is now read-only.

Commit

Permalink
fix when you update app without internet
Browse files Browse the repository at this point in the history
  • Loading branch information
PoloNX committed Jun 13, 2021
1 parent ed25db2 commit b52d39f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions source/download.cpp
Expand Up @@ -201,6 +201,8 @@ bool CurlRequests::downloadFile(const char *filename, const char *urlPatches, bo
std::cout << "erreur curl" << std::endl;
return false;
}

rename ("temp.nro", "sigpatch-downloader.nro");

return true;

Expand Down
2 changes: 1 addition & 1 deletion source/main.cpp
Expand Up @@ -302,7 +302,7 @@ int main()
SDL_RenderPresent(mainRenderer);
CurlRequests *sessionCurl = new CurlRequests;

if (sessionCurl->downloadFile("sigpatch-downloader.nro", "https://github.com/PoloNX/sigpatch-downloader/releases/latest/download/sigpatch-downloader.nro", true) == false)
if (sessionCurl->downloadFile("temp.nro", "https://github.com/PoloNX/sigpatch-downloader/releases/latest/download/sigpatch-downloader.nro", true) == false)
{
downloadIsFinish = 2;
}
Expand Down

0 comments on commit b52d39f

Please sign in to comment.