std::string clientPath = GlobalConfig::GetWrtClientExec();
LogInfo("link -s " << clientPath << " " << execFile);
- symlink(clientPath.c_str(), execFile.c_str());
+ errno = 0;
+ if( symlink(clientPath.c_str(), execFile.c_str()) != 0 )
+ {
+ int error = errno;
+ if(error)
+ LogPedantic("Failed to make a symbolic name for a file "
+ << "[" << DPL::GetErrnoString(error) << "]");
+ ThrowMsg(Exceptions::BackupFailed,
+ "Error occurs during rename file");
+ }
m_context.job->UpdateProgress(
InstallerContext::INSTALL_BACKUP_EXEC,
"Backup execution file for update");