diff --git a/src/gui/update.cpp b/src/gui/update.cpp index b48f13325..b1920827a 100644 --- a/src/gui/update.cpp +++ b/src/gui/update.cpp @@ -757,7 +757,8 @@ int CFlashExpert::exec(CMenuTarget* parent, const std::string & actionKey) showFileSelector(""); } else { 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) { writemtd(actionKey, MTD_OF_WHOLE_IMAGE); diff --git a/src/gui/update_ext.cpp b/src/gui/update_ext.cpp index a629c9664..6bbaa2ee1 100644 --- a/src/gui/update_ext.cpp +++ b/src/gui/update_ext.cpp @@ -137,7 +137,7 @@ bool CExtUpdate::ErrorReset(bool modus, const std::string & msg1, const std::str return false; } -bool CExtUpdate::applySettings(const std::string & filename, int mode) +bool CExtUpdate::applySettings(std::string & filename, int mode) { if(!FileHelpers) FileHelpers = new CFileHelpers(); @@ -165,6 +165,7 @@ bool CExtUpdate::applySettings(const std::string & filename, int mode) else imgFilename = orgPath + "/" + orgName + settingsStr + orgExt; + filename = imgFilename; FileHelpers->copyFile(oldFilename.c_str(), imgFilename.c_str(), 0644); bool ret = applySettings(); diff --git a/src/gui/update_ext.h b/src/gui/update_ext.h index d42f3d9a3..de3b07d65 100644 --- a/src/gui/update_ext.h +++ b/src/gui/update_ext.h @@ -90,7 +90,7 @@ class CExtUpdate ~CExtUpdate(); 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 isBlacklistEntry(const std::string & file);