summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author JW Wang <wangchun@google.com> 2020-06-05 01:29:08 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2020-06-05 01:29:08 +0000
commit5bcc8f8a38ed372cb7487abc6fbdb1ffb87e1681 (patch)
tree090afc08e11f22fc58bd34d3af820e2dcb48d6bc
parenta8d1de82db55e770b6919386bc2a90fdc7079e0a (diff)
parent9b9b1aa0626b01a4836a2c1144d5830a2318235b (diff)
Merge "Delete APK snapshots during restoration (3/n)" into rvc-dev
-rw-r--r--cmds/installd/InstalldNativeService.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/cmds/installd/InstalldNativeService.cpp b/cmds/installd/InstalldNativeService.cpp
index 7d1c1ad37d..b9c1addf89 100644
--- a/cmds/installd/InstalldNativeService.cpp
+++ b/cmds/installd/InstalldNativeService.cpp
@@ -1074,6 +1074,7 @@ binder::Status InstalldNativeService::restoreAppDataSnapshot(
res = error(rc, "Failed copying " + from_ce + " to " + to_ce);
return res;
}
+ delete_dir_contents_and_dir(from_ce, true /* ignore_if_missing */);
}
if (needs_de_rollback) {
@@ -1090,6 +1091,7 @@ binder::Status InstalldNativeService::restoreAppDataSnapshot(
res = error(rc, "Failed copying " + from_de + " to " + to_de);
return res;
}
+ delete_dir_contents_and_dir(from_de, true /* ignore_if_missing */);
}
// Finally, restore the SELinux label on the app data.