summaryrefslogtreecommitdiffstats
path: root/libs/utils
diff options
context:
space:
mode:
authorChristopher Tate <ctate@google.com>2011-06-02 15:08:13 -0700
committerChristopher Tate <ctate@google.com>2011-06-07 12:16:27 -0700
commitb0628bfd5aac480a0d412ac96b8af1d97ac01c30 (patch)
tree1b7854cfc31f7f25ec1879e1d83192ed2b7f5244 /libs/utils
parent5c54f4b3cb6d0e402a0db122f741b488ef95792c (diff)
downloadframeworks_base-b0628bfd5aac480a0d412ac96b8af1d97ac01c30.zip
frameworks_base-b0628bfd5aac480a0d412ac96b8af1d97ac01c30.tar.gz
frameworks_base-b0628bfd5aac480a0d412ac96b8af1d97ac01c30.tar.bz2
Implement shared-storage full backup/restore
Every available shared-storage volume is backed up, tagged with its ordinal in the set of mounted shared volumes. This is an approximation of "internal + the external card". This lets us restore things to the same volume [or "equivalent" volume, in the case of a cross-model restore] as they originated on. Also fixed a bug in the handling of files/dirs with spaces in their names. Change-Id: I380019da8d0bb5b3699bd7c11eeff621a88e78c3
Diffstat (limited to 'libs/utils')
-rw-r--r--libs/utils/BackupHelpers.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/libs/utils/BackupHelpers.cpp b/libs/utils/BackupHelpers.cpp
index f933199..b433fd3 100644
--- a/libs/utils/BackupHelpers.cpp
+++ b/libs/utils/BackupHelpers.cpp
@@ -503,10 +503,10 @@ int write_tarfile(const String8& packageName, const String8& domain,
needExtended = true;
}
- // Non-7bit-clean path also means needing pax extended format
+ // Non-7bit-clean path or embedded spaces also mean needing pax extended format
if (!needExtended) {
for (size_t i = 0; i < filepath.length(); i++) {
- if ((filepath[i] & 0x80) != 0) {
+ if ((filepath[i] & 0x80) != 0 || filepath[i] == ' ') {
needExtended = true;
break;
}