aboutsummaryrefslogtreecommitdiffhomepage
path: root/third_party/ijar/zip_main.cc
diff options
context:
space:
mode:
authorGravatar László Csomor <laszlocsomor@google.com>2016-12-12 09:59:38 +0000
committerGravatar John Cater <jcater@google.com>2016-12-12 20:35:19 +0000
commit9a4dffe435385dff9e9095be6c24834bd1d193da (patch)
tree0f1afce784d57f6d9a6ca2d53a7c90825a0b7e3d /third_party/ijar/zip_main.cc
parent68e850ff8df0e381bd224d9926b400b7320d4fb8 (diff)
Ijar: remove spurious error message
Commit 645dbc4 moved the file stating logic to platform_utils.cc into the `stat_file` method, then commit 8d6da00 added error reporting to that method so callers wouldn't need to report errors on their own. Problem is, one of the callers was using stat_file for simple file existence checking so reporting an error there was spurious. Fixes https://github.com/bazelbuild/bazel/issues/2201 -- Change-Id: I40d1ee2bad8f3d03627c0b5c0bfd593bb5289d23 Reviewed-on: https://cr.bazel.build/7810 PiperOrigin-RevId: 141739581 MOS_MIGRATED_REVID=141739581
Diffstat (limited to 'third_party/ijar/zip_main.cc')
-rw-r--r--third_party/ijar/zip_main.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/third_party/ijar/zip_main.cc b/third_party/ijar/zip_main.cc
index 13bcc69e8f..51aea54157 100644
--- a/third_party/ijar/zip_main.cc
+++ b/third_party/ijar/zip_main.cc
@@ -166,6 +166,7 @@ int add_file(std::unique_ptr<ZipBuilder> const &builder, char *file,
Stat file_stat = {0, 0666, false};
if (file != NULL) {
if (!stat_file(file, &file_stat)) {
+ fprintf(stderr, "Cannot stat file %s: %s\n", file, strerror(errno));
return -1;
}
}
@@ -218,6 +219,7 @@ int add_file(std::unique_ptr<ZipBuilder> const &builder, char *file,
char **read_filelist(char *filename) {
Stat file_stat;
if (!stat_file(filename, &file_stat)) {
+ fprintf(stderr, "Cannot stat file %s: %s\n", filename, strerror(errno));
return NULL;
}