Skip to content
Commit 548ba46c authored by Ross Lagerwall's avatar Ross Lagerwall
Browse files

fuse: Don't g_file_append_to unless O_APPEND is given

Because g_file_append_to opens an output stream that can only append
regardless of the seek position, only use g_file_append_to when O_APPEND
is actually specified.  This prevents file corruption when the mode is
O_WRONLY or O_RDWR without O_APPEND.

Note that this means opening a file with a bare O_WRONLY or O_RDWR
returns ENOTSUP since there is no equivalent in gvfs.

Furthermore, don't attempt to seek when the file mode is O_APPEND since
this is unnecessary.

https://bugzilla.gnome.org/show_bug.cgi?id=632296
parent 8082321c
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment