before updating copy the old boot.dol to prev.dol

This commit is contained in:
Christopher Roy Bratusek 2012-03-12 14:11:43 +01:00
parent c08ff4f916
commit 30175e07f9
3 changed files with 12 additions and 1 deletions

Binary file not shown.

View File

@ -14,8 +14,10 @@
#include "Network/update.h"
#include "Network/http.h"
#include <fstream>
#include <ios>
#/*** Extern variables ***/
/*** Extern variables ***/
extern GuiWindow * mainWindow;
extern bool boot_buffer;
@ -101,6 +103,12 @@ updatePrompt(string rev)
char url[100];
sprintf(url, "http://download.tuxfamily.org/hbf/DOL/rev%s/boot.dol", rev.c_str());
// copy boot.dol to prev.dol
std::ifstream infile((Settings.device_dat + ":/apps/HomebrewFilter/boot.dol").c_str(), std::ios_base::binary);
std::ofstream outfile((Settings.device_dat + ":/apps/HomebrewFilter/prev.dol").c_str(), std::ios_base::binary);
outfile << infile.rdbuf();
struct block file = downloadfile(url);
if (file.data && file.size > 0)
{

View File

@ -1,3 +1,6 @@
//rev37:
- before updating copy the old boot.dol to prev.dol
//rev36:
- HBF is now OpenSource!
- Added license-text of GNU GPL v2