summaryrefslogtreecommitdiff
path: root/libs/utils/BackupHelpers.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libs/utils/BackupHelpers.cpp')
-rw-r--r--libs/utils/BackupHelpers.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/libs/utils/BackupHelpers.cpp b/libs/utils/BackupHelpers.cpp
index e15875f380b7..f933199fe8d1 100644
--- a/libs/utils/BackupHelpers.cpp
+++ b/libs/utils/BackupHelpers.cpp
@@ -503,6 +503,16 @@ int write_tarfile(const String8& packageName, const String8& domain,
needExtended = true;
}
+ // Non-7bit-clean path also means needing pax extended format
+ if (!needExtended) {
+ for (size_t i = 0; i < filepath.length(); i++) {
+ if ((filepath[i] & 0x80) != 0) {
+ needExtended = true;
+ break;
+ }
+ }
+ }
+
int err = 0;
struct stat64 s;
if (lstat64(filepath.string(), &s) != 0) {