diff options
author | Christopher Tate <ctate@google.com> | 2009-06-05 00:29:50 -0700 |
---|---|---|
committer | The Android Open Source Project <initial-contribution@android.com> | 2009-06-05 00:29:50 -0700 |
commit | 3f0c72ab4b3b950ecb29995c07b7af4f71582a7a (patch) | |
tree | 1afebc4682663e4778cb43a3028b580884575564 | |
parent | 9c4125e268d10eb2c4f26ce5c1ac32bf90181c51 (diff) | |
parent | 0032ce80ac127e6bfb25d727162eee4af208dc77 (diff) | |
download | frameworks_base-3f0c72ab4b3b950ecb29995c07b7af4f71582a7a.zip frameworks_base-3f0c72ab4b3b950ecb29995c07b7af4f71582a7a.tar.gz frameworks_base-3f0c72ab4b3b950ecb29995c07b7af4f71582a7a.tar.bz2 |
am 0032ce80: Fix back_up_files() error detection when opening/CRCing the file
Merge commit '0032ce80ac127e6bfb25d727162eee4af208dc77'
* commit '0032ce80ac127e6bfb25d727162eee4af208dc77':
Fix back_up_files() error detection when opening/CRCing the file
-rw-r--r-- | libs/utils/BackupHelpers.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libs/utils/BackupHelpers.cpp b/libs/utils/BackupHelpers.cpp index e8e6c45..7f423a8 100644 --- a/libs/utils/BackupHelpers.cpp +++ b/libs/utils/BackupHelpers.cpp @@ -350,10 +350,11 @@ back_up_files(int oldSnapshotFD, BackupDataWriter* dataStream, int newSnapshotFD FileState& g = newSnapshot.editValueAt(m); int fd = open(realFilename.string(), O_RDONLY); - if (fd != -1) { + if (fd < 0) { // We can't open the file. Don't report it as a delete either. Let the // server keep the old version. Maybe they'll be able to deal with it // on restore. + LOGP("Unable to open file %s - skipping", realFilename.string()); } else { g.crc32 = compute_crc32(fd); |