diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2018-11-27 20:36:44 -0500 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2018-11-27 20:36:44 -0500 |
| commit | e3bf40742d5b93c10b8e68b202294badb508c3e7 (patch) | |
| tree | 73a9219fd0f5ec7985eb9f121390fa2db24654f9 /src/cache_hash.cpp | |
| parent | bb3ac177a83caf52556818e9ea163ac166bb6c07 (diff) | |
| parent | 1fb15be05f1037aad53d2db32d13123363365d10 (diff) | |
| download | zig-e3bf40742d5b93c10b8e68b202294badb508c3e7.tar.gz zig-e3bf40742d5b93c10b8e68b202294badb508c3e7.zip | |
Merge branch 'master' into freebsd2
Diffstat (limited to 'src/cache_hash.cpp')
| -rw-r--r-- | src/cache_hash.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/cache_hash.cpp b/src/cache_hash.cpp index 7a3c08bc27..5e6c3b9a9d 100644 --- a/src/cache_hash.cpp +++ b/src/cache_hash.cpp @@ -352,8 +352,9 @@ Error cache_hit(CacheHash *ch, Buf *out_digest) { // if the mtime matches we can trust the digest OsFile this_file; if ((err = os_file_open_r(chf->path, &this_file))) { + fprintf(stderr, "Unable to open %s\n: %s", buf_ptr(chf->path), err_str(err)); os_file_close(ch->manifest_file); - return err; + return ErrorCacheUnavailable; } OsTimeStamp actual_mtime; if ((err = os_file_mtime(this_file, &actual_mtime))) { @@ -392,8 +393,9 @@ Error cache_hit(CacheHash *ch, Buf *out_digest) { for (; file_i < input_file_count; file_i += 1) { CacheHashFile *chf = &ch->files.at(file_i); if ((err = populate_file_hash(ch, chf, nullptr))) { + fprintf(stderr, "Unable to hash %s: %s\n", buf_ptr(chf->path), err_str(err)); os_file_close(ch->manifest_file); - return err; + return ErrorCacheUnavailable; } } return ErrorNone; |
