Merge branch 'tizen_4.0' into tizen 24/178124/1 accepted/tizen/unified/20180509.073002 submit/tizen/20180508.125915
authorPiotr Kosko <p.kosko@samsung.com>
Tue, 8 May 2018 07:35:06 +0000 (09:35 +0200)
committerPiotr Kosko <p.kosko@samsung.com>
Tue, 8 May 2018 07:35:11 +0000 (09:35 +0200)
Change-Id: I04662d695a7600ab03397c1e775060bc9220220f

packaging/webapi-plugins.spec
src/alarm/alarm_manager.cc
src/filesystem/filesystem_manager.cc

index e70c03f..d122ecb 100644 (file)
@@ -8,7 +8,7 @@
 %define crosswalk_extensions_path %{_libdir}/%{crosswalk_extensions}
 
 Name:       webapi-plugins
-Version:    2.22
+Version:    2.23
 Release:    0
 License:    Apache-2.0 and BSD-3-Clause and MIT
 Group:      Development/Libraries
index 1669bb6..7a27dfc 100644 (file)
@@ -630,7 +630,7 @@ PlatformResult AlarmManager::GetAlarm(int id, picojson::object& obj) {
     }
 
     int ret_app = app_control_get_extra_data(app_control, kAlarmRelativeDelayKey, &delay_string);
-    if (APP_CONTROL_ERROR_NONE != ret) {
+    if (APP_CONTROL_ERROR_NONE != ret_app) {
       return LogAndCreateResult(ErrorCode::NOT_FOUND_ERR, "Failed to get data.",
                                 ("Failed to get data: %d (%s)", ret_app, get_error_message(ret_app)));
     }
index ad518b0..755defb 100644 (file)
@@ -327,14 +327,20 @@ void FilesystemManager::Rename(const std::string oldPath, const std::string& new
     ret |= chown(newPath.c_str(), fileStat.st_uid, fileStat.st_gid);
     if (0 != ret) {
       LoggerE("Error while changing ownership/permissions [%s]", GetErrorString(errno).c_str());
-      remove(newPath.c_str());
+      if (0 != remove(newPath.c_str())) {
+        LoggerW("Error during rollback [%s], some of copied files may still exist",
+                GetErrorString(errno).c_str());
+      }
       error_cb(FilesystemError::Other);
       return;
     }
 
     if (0 != remove(oldPath.c_str())) {
       LoggerE("Error while removing file [%s]", GetErrorString(errno).c_str());
-      remove(newPath.c_str());
+      if (0 != remove(newPath.c_str())) {
+        LoggerW("Error during rollback [%s], some of copied files may still exist",
+                GetErrorString(errno).c_str());
+      }
       error_cb(FilesystemError::Other);
       return;
     }