summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authorRoss Lagerwall <rosslagerwall@gmail.com>2013-09-25 20:42:33 +0200
committerAlexander Larsson <alexl@redhat.com>2013-10-02 10:20:01 +0200
commit64ccbde184653f2ce3ed3e5395eb336b379e5847 (patch)
tree706628cf1ce603c140c2833676bf7495e3e5c2c1 /client
parentbdc3babbe21e5fed06876db4d56d1b13915fe1cb (diff)
downloadgvfs-64ccbde184653f2ce3ed3e5395eb336b379e5847.tar.gz
fuse: Fix seek offset calculation
Since fh->pos is already incremented by n_bytes_skipped, check if offset == fh->pos. This error was hidden by the fact that the operation is retried when -EIO is returned. When it was retried, the stream was already in the correct position and so no seek operation was required.
Diffstat (limited to 'client')
-rw-r--r--client/gvfsfusedaemon.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/client/gvfsfusedaemon.c b/client/gvfsfusedaemon.c
index ce15a0e7..e8cada17 100644
--- a/client/gvfsfusedaemon.c
+++ b/client/gvfsfusedaemon.c
@@ -1198,7 +1198,7 @@ read_stream (FileHandle *fh, gchar *output_buf, size_t output_buf_size, off_t of
if (n_bytes_skipped > 0)
fh->pos += n_bytes_skipped;
- if (n_bytes_skipped != offset - fh->pos)
+ if (offset != fh->pos)
{
if (error)
{