Delete APK snapshots during restoration (3/n)
The snapshots are no longer needed after restore is done. We do this in keeping with the fact that apk/apex code data is deleted immediately after the rollback is committed. See go/rollbackmanager-snapshot-deletion for more details. Bug: 151805360 Test: N/A. Will be added in the next CL. Merged-In: I5a7540aa08922c4b0c617c9cb37e1bec2ff23fc1 Change-Id: I5a7540aa08922c4b0c617c9cb37e1bec2ff23fc1
This commit is contained in:
parent
a38a3e145a
commit
9b9b1aa062
1 changed files with 2 additions and 0 deletions
|
@ -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.
|
||||
|
|
Loading…
Reference in a new issue