From a083dc68c6789a68ec0c0ede3cf40358e49b026c Mon Sep 17 00:00:00 2001 From: nailyk Date: Fri, 11 Nov 2016 21:41:28 +0100 Subject: 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 --- partition.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/partition.cpp b/partition.cpp index 5a53d619a..ae27fd0cc 100644 --- a/partition.cpp +++ b/partition.cpp @@ -2340,6 +2340,12 @@ bool TWPartition::Raw_Read_Write(PartitionSettings *part_settings) { 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) -- cgit v1.2.3