summaryrefslogtreecommitdiffstats
path: root/rbutil/bootloaders.cpp
diff options
context:
space:
mode:
authorDominik Wenger <domonoky@googlemail.com>2007-03-01 17:22:49 +0000
committerDominik Wenger <domonoky@googlemail.com>2007-03-01 17:22:49 +0000
commitba7d27786d1af8d3843edde0fb3cea5be4a2cb37 (patch)
tree3cb4cce087bbc6ac7a80132ffd48677cc18c65ad /rbutil/bootloaders.cpp
parent7230674b5dc955120780535c83260b1c6e67aeaa (diff)
downloadrockbox-ba7d27786d1af8d3843edde0fb3cea5be4a2cb37.tar.gz
rockbox-ba7d27786d1af8d3843edde0fb3cea5be4a2cb37.tar.bz2
rockbox-ba7d27786d1af8d3843edde0fb3cea5be4a2cb37.zip
Fix for the Bootloader installation for H10, thanks to barrywardell
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12537 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'rbutil/bootloaders.cpp')
-rwxr-xr-xrbutil/bootloaders.cpp19
1 files changed, 10 insertions, 9 deletions
diff --git a/rbutil/bootloaders.cpp b/rbutil/bootloaders.cpp
index a2a52be209..dd92b4a343 100755
--- a/rbutil/bootloaders.cpp
+++ b/rbutil/bootloaders.cpp
@@ -276,9 +276,10 @@ bool h10(int mode)
{
wxString err,src,dest,path1,path2;
- int pos = gv->curbootloader.Find('/');
+ int pos = gv->curbootloader.Find('/');
+ if(pos == wxNOT_FOUND) pos = 0;
wxString firmwarename = gv->curbootloader.SubString(pos,gv->curbootloader.Length());
- wxString firmDir = gv->curbootloader.SubString(0,pos);
+ //wxString firmDir = gv->curbootloader.SubString(0,pos);
if(mode == BOOTLOADER_ADD)
{
@@ -294,12 +295,12 @@ bool h10(int mode)
return false;
}
- path1.Printf("%s" PATH_SEP "SYSTEM" PATH_SEP "%s",gv->curdestdir.c_str(),firmwarename.c_str());
- path2.Printf("%s" PATH_SEP "SYSTEM" PATH_SEP "Original.mi4",gv->curdestdir.c_str());
+ path1.Printf("%sSYSTEM" PATH_SEP "%s",gv->curdestdir.c_str(),firmwarename.c_str());
+ path2.Printf("%sSYSTEM" PATH_SEP "Original.mi4",gv->curdestdir.c_str());
if(!wxFileExists(path1)) //Firmware dosent exists on player
{
- path1.Printf("%s" PATH_SEP "SYSTEM" PATH_SEP "H10EMP.mi4"); //attempt other firmwarename
+ path1.Printf("%sSYSTEM" PATH_SEP "H10EMP.mi4"); //attempt other firmwarename
if(!wxFileExists(path1)) //Firmware dosent exists on player
{
err.Printf("[ERR] File %s does not Exist",path1.c_str());
@@ -307,9 +308,9 @@ bool h10(int mode)
return false;
}
}
- if(!wxFileExists(path2)) //there is already a original firmware
+ if(wxFileExists(path2)) //there is already a original firmware
{
- err.Printf("[ERR] File %s does not Exist",path1.c_str());
+ err.Printf("[ERR2] File %s does Exist",path2.c_str());
ERR_DIALOG(err, _("Bootloader add"));
return false;
}
@@ -331,8 +332,8 @@ bool h10(int mode)
}
else if(mode == BOOTLOADER_REM)
{
- path1.Printf("%s" PATH_SEP "SYSTEM" PATH_SEP "%s",gv->curdestdir.c_str(),firmwarename.c_str());
- path2.Printf("%s" PATH_SEP "SYSTEM" PATH_SEP "Original.mi4",gv->curdestdir.c_str());
+ path1.Printf("%sSYSTEM" PATH_SEP "%s",gv->curdestdir.c_str(),firmwarename.c_str());
+ path2.Printf("%sSYSTEM" PATH_SEP "Original.mi4",gv->curdestdir.c_str());
if(!wxFileExists(path1)) //Firmware dosent exists on player
{
path1.Printf("%s" PATH_SEP "SYSTEM" PATH_SEP "H10EMP.mi4"); //attempt other firmwarename