GNOME Bugzilla – Bug 709432
Doesn't allow to seek past the end of a file
Last modified: 2013-10-08 07:51:32 UTC
Filing under "general" because Alex said all backends need to be checked. The sftp backend has the following wrong code in the seek reply functions: if (handle->offset > file_size) handle->offset = file_size; which disables seeking past the end of a file.
Created attachment 256688 [details] [review] sftp: Allow seek past end of file also, don't query for the file size unless required for SEEK_END
Created attachment 256689 [details] [review] mtp: Allow seek past end of file
Created attachment 256690 [details] [review] cdda: Allow seek past end of file
Created attachment 256691 [details] [review] gphoto2: Allow seek past end of file
Created attachment 256692 [details] [review] afp: Allow seek past end of file Also, only query file size if needed for G_SEEK_END.
Attachment 256688 [details] pushed as 5fb056f - sftp: Allow seek past end of file Attachment 256689 [details] pushed as fb56d6d - mtp: Allow seek past end of file Attachment 256690 [details] pushed as 77f98e8 - cdda: Allow seek past end of file Attachment 256691 [details] pushed as d12755f - gphoto2: Allow seek past end of file Attachment 256692 [details] pushed as 1474a61 - afp: Allow seek past end of file