mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-09-21 13:34:59 +02:00
Log real error message when unable to remove a storagedir file
Attempts to help diagnose 22752.
This commit is contained in:
parent
de5f0d8ba7
commit
a088a08eeb
@ -119,7 +119,8 @@ storage_dir_clean_tmpfiles(storage_dir_t *d)
|
|||||||
char *path = NULL;
|
char *path = NULL;
|
||||||
tor_asprintf(&path, "%s/%s", d->directory, fname);
|
tor_asprintf(&path, "%s/%s", d->directory, fname);
|
||||||
if (unlink(sandbox_intern_string(path))) {
|
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);
|
tor_free(path);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@ -455,7 +456,8 @@ storage_dir_remove_file(storage_dir_t *d,
|
|||||||
if (unlink(ipath) == 0) {
|
if (unlink(ipath) == 0) {
|
||||||
storage_dir_reduce_usage(d, size);
|
storage_dir_reduce_usage(d, size);
|
||||||
} else {
|
} 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);
|
tor_free(path);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user