ADBbackups: Fix wrong owner on binary backups.
- Set the correct owner on binary backup files to flash storage.
Solve https://github.com/TeamWin/Team-Win-Recovery-Project/issues/749
Change-Id: I5526494c77232f524cf02a482de070b44248c4a0
diff --git a/partition.cpp b/partition.cpp
index 5a53d61..ae27fd0 100644
--- a/partition.cpp
+++ b/partition.cpp
@@ -2340,6 +2340,12 @@
if (part_settings->progress)
part_settings->progress->UpdateDisplayDetails(true);
fsync(dest_fd);
+
+ if (!part_settings->adbbackup && part_settings->PM_Method == PM_BACKUP) {
+ tw_set_default_metadata(destfn.c_str());
+ LOGINFO("Restored default metadata for %s\n", destfn.c_str());
+ }
+
ret = true;
exit:
if (src_fd >= 0)