mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-31 01:11:06 +02:00
Softupdate/applySettigs: No rename/copy file when update_dir=/tmp
Origin commit data
------------------
Branch: ni/coolstream
Commit: f91f3f3610
Author: Michael Liebmann <tuxcode.bbg@gmail.com>
Date: 2013-08-20 (Tue, 20 Aug 2013)
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
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 settingsStr = "+settings";
|
||||
|
||||
if (g_settings.softupdate_name_mode_apply == CExtUpdate::SOFTUPDATE_NAME_HOSTNAME_TIME)
|
||||
imgFilename = orgPath + "/" + hostName + timeStr + settingsStr + orgExt;
|
||||
else if (g_settings.softupdate_name_mode_apply == CExtUpdate::SOFTUPDATE_NAME_ORGNAME_TIME)
|
||||
imgFilename = orgPath + "/" + orgName + timeStr + settingsStr + orgExt;
|
||||
if (orgPath != "/tmp") {
|
||||
if (g_settings.softupdate_name_mode_apply == CExtUpdate::SOFTUPDATE_NAME_HOSTNAME_TIME)
|
||||
imgFilename = orgPath + "/" + hostName + timeStr + settingsStr + orgExt;
|
||||
else if (g_settings.softupdate_name_mode_apply == CExtUpdate::SOFTUPDATE_NAME_ORGNAME_TIME)
|
||||
imgFilename = orgPath + "/" + orgName + timeStr + settingsStr + orgExt;
|
||||
else
|
||||
imgFilename = orgPath + "/" + orgName + settingsStr + orgExt;
|
||||
FileHelpers->copyFile(oldFilename.c_str(), imgFilename.c_str(), 0644);
|
||||
}
|
||||
else
|
||||
imgFilename = orgPath + "/" + orgName + settingsStr + orgExt;
|
||||
|
||||
imgFilename = oldFilename;
|
||||
filename = imgFilename;
|
||||
FileHelpers->copyFile(oldFilename.c_str(), imgFilename.c_str(), 0644);
|
||||
|
||||
bool ret = applySettings();
|
||||
DBG_TIMER_STOP("Image editing")
|
||||
|
Reference in New Issue
Block a user