LogDebug("StepCreateBackupFolder");
std::string backPath = m_context.locations->getBackupDir();
- LogDebug("backup resource directory path : " << backPath);
+ LogDebug("Backup resource directory path : " << backPath);
std::string pkgPath = m_context.locations->getPackageInstallationDir();
if (0 == access(backPath.c_str(), F_OK)) {
- WrtUtilRemove(backPath);
+ if (!WrtUtilRemove(backPath)) {
+ ThrowMsg(Exceptions::RemovingFolderFailure,
+ "Error occurs during removing backup resource directory");
+ }
}
LogDebug("copy : " << pkgPath << " to " << backPath);
if ((rename(pkgPath.c_str(), backPath.c_str())) != 0) {