mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-30 08:51:10 +02:00
Softupdate/applySettigs: No rename/copy file when update_dir=/tmp
This commit is contained in:
@@ -158,15 +158,18 @@ bool CExtUpdate::applySettings(std::string & filename, int mode)
|
|||||||
std::string timeStr = getNowTimeStr("_%Y%m%d_%H%M");
|
std::string timeStr = getNowTimeStr("_%Y%m%d_%H%M");
|
||||||
std::string settingsStr = "+settings";
|
std::string settingsStr = "+settings";
|
||||||
|
|
||||||
|
if (orgPath != "/tmp") {
|
||||||
if (g_settings.softupdate_name_mode_apply == CExtUpdate::SOFTUPDATE_NAME_HOSTNAME_TIME)
|
if (g_settings.softupdate_name_mode_apply == CExtUpdate::SOFTUPDATE_NAME_HOSTNAME_TIME)
|
||||||
imgFilename = orgPath + "/" + hostName + timeStr + settingsStr + orgExt;
|
imgFilename = orgPath + "/" + hostName + timeStr + settingsStr + orgExt;
|
||||||
else if (g_settings.softupdate_name_mode_apply == CExtUpdate::SOFTUPDATE_NAME_ORGNAME_TIME)
|
else if (g_settings.softupdate_name_mode_apply == CExtUpdate::SOFTUPDATE_NAME_ORGNAME_TIME)
|
||||||
imgFilename = orgPath + "/" + orgName + timeStr + settingsStr + orgExt;
|
imgFilename = orgPath + "/" + orgName + timeStr + settingsStr + orgExt;
|
||||||
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);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
imgFilename = oldFilename;
|
||||||
|
filename = imgFilename;
|
||||||
|
|
||||||
bool ret = applySettings();
|
bool ret = applySettings();
|
||||||
DBG_TIMER_STOP("Image editing")
|
DBG_TIMER_STOP("Image editing")
|
||||||
|
Reference in New Issue
Block a user