diff options
author | Hans Petter Jansson <hpj@novell.com> | 2009-04-02 04:39:42 +0000 |
---|---|---|
committer | Hans Petter <hansp@src.gnome.org> | 2009-04-02 04:39:42 +0000 |
commit | d41b9449184c6f808892e62c92f1dbf9b263e34f (patch) | |
tree | 1cc9363ba005fe18c0508666d9e33d15c77deb9b | |
parent | 8d75084b255c3df262a25ff2dab023f98ed8245a (diff) | |
download | gvfs-d41b9449184c6f808892e62c92f1dbf9b263e34f.tar.gz |
Related to bug #574968 - gvfs ftp backend appears to not wait for ftpd
2009-04-01 Hans Petter Jansson <hpj@novell.com>
Related to bug #574968 - gvfs ftp backend appears to not wait for ftpd
return code on STOR.
* client/gvfsfusedaemon.c
(vfs_fsync): Implement by closing stream.
svn path=/trunk/; revision=2358
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | client/gvfsfusedaemon.c | 20 |
2 files changed, 28 insertions, 0 deletions
@@ -1,5 +1,13 @@ 2009-04-01 Hans Petter Jansson <hpj@novell.com> + Related to bug #574968 - gvfs ftp backend appears to not wait for ftpd + return code on STOR. + + * client/gvfsfusedaemon.c + (vfs_fsync): Implement by closing stream. + +2009-04-01 Hans Petter Jansson <hpj@novell.com> + * client/gvfsfusedaemon.c (errno_from_error): Add G_IO_ERROR_WOULD_BLOCK -> EAGAIN mapping. diff --git a/client/gvfsfusedaemon.c b/client/gvfsfusedaemon.c index e93a3073..bc9c23a6 100644 --- a/client/gvfsfusedaemon.c +++ b/client/gvfsfusedaemon.c @@ -1424,6 +1424,25 @@ vfs_flush (const gchar *path, struct fuse_file_info *fi) } static gint +vfs_fsync (const gchar *path, gint sync_data_only, struct fuse_file_info *fi) +{ + FileHandle *fh = get_file_handle_from_info (fi); + + debug_print ("vfs_flush: %s\n", path); + + if (fh) + { + file_handle_close_stream (fh); + + /* get_file_handle_from_info () adds a "working ref", so release that. */ + file_handle_unref (fh); + } + + /* TODO: Error handling. */ + return 0; +} + +static gint vfs_opendir (const gchar *path, struct fuse_file_info *fi) { GFile *file; @@ -2302,6 +2321,7 @@ static struct fuse_operations vfs_oper = .create = vfs_create, .release = vfs_release, .flush = vfs_flush, + .fsync = vfs_fsync, .read = vfs_read, .write = vfs_write, |