mirror of
https://github.com/amadvance/snapraid.git
synced 2026-11-20 23:16:28 -05:00
More consistent in error reporting for files with garbage at the end.
This commit is contained in:
parent
46fb4a311a
commit
8b3075a023
3 changed files with 21 additions and 13 deletions
4
handle.h
4
handle.h
|
|
@ -37,7 +37,9 @@ int handle_close_if_different(struct snapraid_handle* handle, struct snapraid_fi
|
|||
/**
|
||||
* Creates a file.
|
||||
* The file is created if missing, and opened with write access.
|
||||
* If the file is larger than expected, the value 1 is returned, and the file is truncated to the correct size.
|
||||
* If the file has a different size than expected, it's enlarged or truncated to the correct size.
|
||||
* If the file is truncated 1 is returned.
|
||||
* The initial size of the file is stored in the file->st struct.
|
||||
* If the file cannot be opened for write access, it's opened with read-only access.
|
||||
* The read-only access works only if the file has already the correct size and doesn't need to be modified.
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue