Changes the way files without read or write permission are handled.

Now we try to continue processing returning a warning where possible.
This commit is contained in:
Andrea Mazzoleni 2011-06-11 09:38:19 +02:00
parent ede528636f
commit f8d2c91a96
6 changed files with 52 additions and 14 deletions

View file

@ -36,8 +36,10 @@ int handle_close_if_different(struct snapraid_handle* handle, struct snapraid_fi
/**
* Creates a file.
* The file is created if missing, and opening with write access.
* 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 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.
*/
int handle_create(struct snapraid_handle* handle, struct snapraid_file* file);