diff options
author | Nick Mathewson <nickm@torproject.org> | 2017-06-28 14:24:27 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2017-06-28 14:24:27 -0400 |
commit | a088a08eeb076a80dfe3392bf913a955ac1bd4e6 (patch) | |
tree | 20fd7304686bd2f3a76a917b1790a74c909fe65a /src/common/storagedir.c | |
parent | de5f0d8ba7156e9579cc52898cbe0b3a25f64aad (diff) | |
download | tor-a088a08eeb076a80dfe3392bf913a955ac1bd4e6.tar.gz tor-a088a08eeb076a80dfe3392bf913a955ac1bd4e6.zip |
Log real error message when unable to remove a storagedir file
Attempts to help diagnose 22752.
Diffstat (limited to 'src/common/storagedir.c')
-rw-r--r-- | src/common/storagedir.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/common/storagedir.c b/src/common/storagedir.c index 4405731884..31933f64c2 100644 --- a/src/common/storagedir.c +++ b/src/common/storagedir.c @@ -119,7 +119,8 @@ storage_dir_clean_tmpfiles(storage_dir_t *d) char *path = NULL; tor_asprintf(&path, "%s/%s", d->directory, fname); if (unlink(sandbox_intern_string(path))) { - log_warn(LD_FS, "Unable to unlink %s", escaped(path)); + log_warn(LD_FS, "Unable to unlink %s while cleaning " + "temporary files: %s", escaped(path), strerror(errno)); tor_free(path); continue; } @@ -455,7 +456,8 @@ storage_dir_remove_file(storage_dir_t *d, if (unlink(ipath) == 0) { storage_dir_reduce_usage(d, size); } else { - log_warn(LD_FS, "Unable to unlink %s", escaped(path)); + log_warn(LD_FS, "Unable to unlink %s while removing file: %s", + escaped(path), strerror(errno)); tor_free(path); return; } |