Add sync() command after recovery file content change 34/121234/1 accepted/tizen/3.0/common/20170331.151916 accepted/tizen/3.0/ivi/20170331.044258 accepted/tizen/3.0/mobile/20170331.044021 accepted/tizen/3.0/tv/20170331.044151 accepted/tizen/3.0/wearable/20170331.044226 submit/tizen_3.0/20170329.045543
authorBartlomiej Kunikowski <b.kunikowski@partner.samsung.com>
Fri, 24 Feb 2017 07:04:11 +0000 (08:04 +0100)
committerBartlomiej Kunikowski <b.kunikowski@partner.samsung.com>
Mon, 27 Mar 2017 08:58:27 +0000 (10:58 +0200)
There is no synchronization between cached memory and
filesystem, and when we stop eg. installation process by
remove battery from device, and after device is launched
again there is no recovery file of this operation, but we need
it to properly recovery of installation process.

Change-Id: Ie9dfe8a3a71cc36d8b95b39ed62bc17b61120b61

src/common/recovery_file.cc

index 4d988b8..113a533 100644 (file)
@@ -214,6 +214,7 @@ bool RecoveryFile::WriteAndCommitFileContent() {
   fputs(pkgid_.c_str(), handle);
   fputs("\n", handle);
   fclose(handle);
+  sync();
   return true;
 }