[gvfs/wip/cosimoc/admin: 12/17] admin: remove unneeded code
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gvfs/wip/cosimoc/admin: 12/17] admin: remove unneeded code
- Date: Mon, 11 Jul 2016 14:53:10 +0000 (UTC)
commit e85e4a12227192e3c0cd8a3f16455d226e3de685
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Sun Mar 27 10:04:54 2016 -0700
admin: remove unneeded code
g_file_append_to() will already return a stream that points to the end
of the file.
daemon/gvfsbackendadmin.c | 13 +------------
1 files changed, 1 insertions(+), 12 deletions(-)
---
diff --git a/daemon/gvfsbackendadmin.c b/daemon/gvfsbackendadmin.c
index 08e92c1..a767595 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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]