diff options
| author | 2011-06-08 20:13:57 -0700 | |
|---|---|---|
| committer | 2011-06-08 20:13:57 -0700 | |
| commit | 13f99a0d0e309b63c3441148032e9992c0e4e650 (patch) | |
| tree | f855071f145d8420b6bee554ff2484994d8e2254 /libs/utils/BackupHelpers.cpp | |
| parent | 9b3811b685a384be930e18b37e26c1c58a3da3d0 (diff) | |
| parent | e9e78ecd2c0ae5f48ed81fdfff4a89cb803fc409 (diff) | |
Merge "Fix handling of directory entries"
Diffstat (limited to 'libs/utils/BackupHelpers.cpp')
| -rw-r--r-- | libs/utils/BackupHelpers.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libs/utils/BackupHelpers.cpp b/libs/utils/BackupHelpers.cpp index f933199fe8d1..87549fe97771 100644 --- a/libs/utils/BackupHelpers.cpp +++ b/libs/utils/BackupHelpers.cpp @@ -525,6 +525,7 @@ int write_tarfile(const String8& packageName, const String8& domain, String8 prefix; const int isdir = S_ISDIR(s.st_mode); + if (isdir) s.st_size = 0; // directories get no actual data in the tar stream // !!! TODO: use mmap when possible to avoid churning the buffer cache // !!! TODO: this will break with symlinks; need to use readlink(2) |