Softupdate: Fix filename for local update

This commit is contained in:
Michael Liebmann
2013-08-20 20:38:51 +02:00
parent 12910d1af3
commit 9b12442b5d
3 changed files with 5 additions and 3 deletions

View File

@@ -757,7 +757,8 @@ int CFlashExpert::exec(CMenuTarget* parent, const std::string & actionKey)
showFileSelector(""); showFileSelector("");
} else { } else {
if(selectedMTD == 10) { if(selectedMTD == 10) {
CExtUpdate::getInstance()->applySettings(actionKey, CExtUpdate::MODE_EXPERT); std::string aK = actionKey;
CExtUpdate::getInstance()->applySettings(aK, CExtUpdate::MODE_EXPERT);
} }
else if(selectedMTD==-1) { else if(selectedMTD==-1) {
writemtd(actionKey, MTD_OF_WHOLE_IMAGE); writemtd(actionKey, MTD_OF_WHOLE_IMAGE);

View File

@@ -137,7 +137,7 @@ bool CExtUpdate::ErrorReset(bool modus, const std::string & msg1, const std::str
return false; return false;
} }
bool CExtUpdate::applySettings(const std::string & filename, int mode) bool CExtUpdate::applySettings(std::string & filename, int mode)
{ {
if(!FileHelpers) if(!FileHelpers)
FileHelpers = new CFileHelpers(); FileHelpers = new CFileHelpers();
@@ -165,6 +165,7 @@ bool CExtUpdate::applySettings(const std::string & filename, int mode)
else else
imgFilename = orgPath + "/" + orgName + settingsStr + orgExt; imgFilename = orgPath + "/" + orgName + settingsStr + orgExt;
filename = imgFilename;
FileHelpers->copyFile(oldFilename.c_str(), imgFilename.c_str(), 0644); FileHelpers->copyFile(oldFilename.c_str(), imgFilename.c_str(), 0644);
bool ret = applySettings(); bool ret = applySettings();

View File

@@ -90,7 +90,7 @@ class CExtUpdate
~CExtUpdate(); ~CExtUpdate();
static CExtUpdate* getInstance(); static CExtUpdate* getInstance();
bool applySettings(const std::string & filename, int mode); bool applySettings(std::string & filename, int mode);
bool ErrorReset(bool modus, const std::string & msg1="", const std::string & msg2=""); bool ErrorReset(bool modus, const std::string & msg1="", const std::string & msg2="");
bool isBlacklistEntry(const std::string & file); bool isBlacklistEntry(const std::string & file);