[gvfs] gphoto2: Allow seek past end of file



commit d12755f991a14f4f7d5cc6930a9026e106b88933
Author: Alexander Larsson <alexl redhat com>
Date:   Tue Oct 8 09:27:56 2013 +0200

    gphoto2: Allow seek past end of file
    
    https://bugzilla.gnome.org/show_bug.cgi?id=709432

 daemon/gvfsbackendgphoto2.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/daemon/gvfsbackendgphoto2.c b/daemon/gvfsbackendgphoto2.c
index 19f3c34..aecb1a1 100644
--- a/daemon/gvfsbackendgphoto2.c
+++ b/daemon/gvfsbackendgphoto2.c
@@ -2024,7 +2024,7 @@ try_seek_on_read (GVfsBackend *backend,
       break;
     }
 
-  if (new_offset < 0 || new_offset > read_handle->size)
+  if (new_offset < 0)
     {
       g_vfs_job_failed (G_VFS_JOB (job), G_IO_ERROR,
                         G_IO_ERROR_FAILED,
@@ -3212,7 +3212,7 @@ do_seek_on_write (GVfsBackend *backend,
       break;
     }
 
-  if (new_offset < 0 || new_offset > write_handle->size)
+  if (new_offset < 0)
     {
       g_vfs_job_failed (G_VFS_JOB (job), G_IO_ERROR,
                        G_IO_ERROR_FAILED,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]