summaryrefslogtreecommitdiff
path: root/daemon
diff options
context:
space:
mode:
authorCosimo Cecchi <cosimoc@gnome.org>2016-03-27 10:04:54 -0700
committerCosimo Cecchi <cosimo@endlessm.com>2016-07-13 13:35:14 -0700
commitabc599a5cd986dcfe8f2d0e25253b81ea9c40f1f (patch)
tree2cdd609afe126e8a94984577e6f2bdc8cfaca8b5 /daemon
parent5e685faa63f0e18abc525e431973cbccf5e2d002 (diff)
downloadgvfs-abc599a5cd986dcfe8f2d0e25253b81ea9c40f1f.tar.gz
admin: remove unneeded code
g_file_append_to() will already return a stream that points to the end of the file.
Diffstat (limited to 'daemon')
-rw-r--r--daemon/gvfsbackendadmin.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/daemon/gvfsbackendadmin.c b/daemon/gvfsbackendadmin.c
index 08e92c10..a767595d 100644
--- a/daemon/gvfsbackendadmin.c
+++ b/daemon/gvfsbackendadmin.c
@@ -256,7 +256,6 @@ do_append_to (GVfsBackend *backend,
GError *error = NULL;
GFile *file;
GFileOutputStream *stream;
- GSeekable *seekable;
if (!check_permission (self, job))
return;
@@ -268,19 +267,9 @@ do_append_to (GVfsBackend *backend,
if (error != NULL)
goto out;
- seekable = G_SEEKABLE (stream);
-
- /* Seek to the end of the file */
- g_seekable_seek (seekable, 0, G_SEEK_END, job->cancellable, &error);
- if (error != NULL)
- {
- g_object_unref (stream);
- goto out;
- }
-
set_open_for_write_attributes (open_write_job, stream);
g_vfs_job_open_for_write_set_initial_offset
- (open_write_job, g_seekable_tell (seekable));
+ (open_write_job, g_seekable_tell (G_SEEKABLE (stream)));
out:
complete_job (job, error);