Don't clear fs_mount_dir_
During postinstall, fs_mount_dir_ is cleared after postinstall is
completed for a partition. If there are more than 1 partition which runs
postinstall, the next partition will see an empty fs_mount_dir_ and
fail.
Test: treehugger
Bug: 175232022
Change-Id: I42110d0e2a886b631f0984edcdc7a916b1121e3e
diff --git a/payload_consumer/postinstall_runner_action.cc b/payload_consumer/postinstall_runner_action.cc
index 6a6d687..dc444c7 100644
--- a/payload_consumer/postinstall_runner_action.cc
+++ b/payload_consumer/postinstall_runner_action.cc
@@ -63,6 +63,8 @@
TEST_AND_RETURN(base::CreateNewTempDirectory("au_postint_mount", &temp_dir));
fs_mount_dir_ = temp_dir.value();
#endif // __ANDROID__
+ CHECK(!fs_mount_dir_.empty());
+ LOG(INFO) << "postinstall mount point: " << fs_mount_dir_;
}
void PostinstallRunnerAction::PerformAction() {
@@ -315,7 +317,6 @@
PLOG(WARNING) << "Not removing temporary mountpoint " << fs_mount_dir_;
}
#endif
- fs_mount_dir_.clear();
progress_fd_ = -1;
progress_controller_.reset();