mirror of
https://github.com/tstack/lnav
synced 2024-11-19 15:25:34 +00:00
[remote] fix an issue with empty files
This commit is contained in:
parent
5607b1b08e
commit
33bfc873b1
@ -528,7 +528,9 @@ int poll_paths(struct list *path_list, struct client_path_state *root_cps)
|
|||||||
|
|
||||||
if (bytes_read == -1) {
|
if (bytes_read == -1) {
|
||||||
set_client_path_state_error(curr, "pread");
|
set_client_path_state_error(curr, "pread");
|
||||||
} else if (curr->cps_client_state == CS_INIT) {
|
} else if (curr->cps_client_state == CS_INIT &&
|
||||||
|
(curr->cps_client_file_offset < 0 ||
|
||||||
|
bytes_read > 0)) {
|
||||||
uint8_t hash[SHA_256_HASH_SIZE];
|
uint8_t hash[SHA_256_HASH_SIZE];
|
||||||
|
|
||||||
calc_sha_256(hash, buffer, bytes_read);
|
calc_sha_256(hash, buffer, bytes_read);
|
||||||
|
Loading…
Reference in New Issue
Block a user