mirror of
https://github.com/amadvance/snapraid.git
synced 2026-11-26 09:56:29 -05:00
Fixes a bug in check when detecting garbage data over the expected end of a file.
More extensive tests to detect the append/truncate conditions.
This commit is contained in:
parent
5baef32fb9
commit
a9255683f4
8 changed files with 204 additions and 42 deletions
6
handle.c
6
handle.c
|
|
@ -164,6 +164,12 @@ int handle_create(struct snapraid_handle* handle, struct snapraid_file* file)
|
|||
}
|
||||
#endif
|
||||
|
||||
/* return the warning condition of a larger file */
|
||||
if (handle->st.st_size > file->size) {
|
||||
fprintf(stderr, "File '%s' truncated to size %llu.\n", handle->path, file->size);
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue