Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(184)

Unified Diff: tools/android/md5sum/md5sum.cc

Issue 1321503003: Fix md5sum printing a stale checksum for missing files. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: forgot if I already uploaded... Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « build/android/pylib/utils/md5sum_test.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/android/md5sum/md5sum.cc
diff --git a/tools/android/md5sum/md5sum.cc b/tools/android/md5sum/md5sum.cc
index a204569d1fdc99eba0965416bd481bfddf0c0f96..3db05ff18c908c5d1b997d768515cc0c3d4262d6 100644
--- a/tools/android/md5sum/md5sum.cc
+++ b/tools/android/md5sum/md5sum.cc
@@ -79,11 +79,13 @@ int main(int argc, const char* argv[]) {
std::string digest;
for (std::set<std::string>::const_iterator it = files.begin();
it != files.end(); ++it) {
- if (!MD5Sum(it->c_str(), &digest))
+ if (!MD5Sum(it->c_str(), &digest)) {
failed = true;
- base::FilePath file_path(*it);
- std::cout << digest << " "
- << base::MakeAbsoluteFilePath(file_path).value() << std::endl;
+ } else {
+ base::FilePath file_path(*it);
+ std::cout << digest << " "
+ << base::MakeAbsoluteFilePath(file_path).value() << std::endl;
+ }
}
return failed;
}
« no previous file with comments | « build/android/pylib/utils/md5sum_test.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698