mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2025-02-23 14:40:51 +01:00
make the warn message better for reading short files
svn:r2385
This commit is contained in:
parent
0d2f9b9b4b
commit
1e3b9e7d31
1 changed files with 2 additions and 2 deletions
|
@ -1556,8 +1556,8 @@ char *read_file_to_str(const char *filename, int bin) {
|
|||
} else if (bin && r != statbuf.st_size) {
|
||||
/* If we're in binary mode, then we'd better have an exact match for
|
||||
* size. Otherwise, win32 encoding may throw us off, and that's okay. */
|
||||
log_fn(LOG_WARN,"Couldn't read all %ld bytes of file '%s'.",
|
||||
(long)statbuf.st_size,filename);
|
||||
log_fn(LOG_WARN,"Could read only %d of %ld bytes of file '%s'.",
|
||||
r, (long)statbuf.st_size,filename);
|
||||
tor_free(string);
|
||||
close(fd);
|
||||
return NULL;
|
||||
|
|
Loading…
Add table
Reference in a new issue