From 9f6bf0da77bd36adf2637caf4b8c42591c5e1cf4 Mon Sep 17 00:00:00 2001 From: Miklos Szeredi Date: Thu, 20 Oct 2005 10:39:51 +0000 Subject: fix --- ChangeLog | 7 +++++++ sshfs.c | 15 +++++++++++++++ 2 files changed, 22 insertions(+) diff --git a/ChangeLog b/ChangeLog index 8009ab6..7f3fc79 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2005-10-19 Miklos Szeredi + + * GNOME Nautilus fails to copy file to sshfs filesystem, because + FUSE returns zero free space. So instead return huge (999999999 + kbytes) amount of free space, yet it should be obvious that the + number is artificial. Bug report by Peter Kronheimer + 2005-10-18 Miklos Szeredi * Add remote uid detection and translation ('idmap=user' option). diff --git a/sshfs.c b/sshfs.c index 659f9ad..724346d 100644 --- a/sshfs.c +++ b/sshfs.c @@ -1748,6 +1748,20 @@ static int sshfs_write(const char *path, const char *wbuf, size_t size, return err ? err : (int) size; } +static int sshfs_statfs(const char *path, struct statfs *buf) +{ + (void) path; + + buf->f_namelen = 255; + buf->f_bsize = 512; + buf->f_blocks = 999999999 * 2; + buf->f_bfree = 999999999 * 2; + buf->f_bavail = 999999999 * 2; + buf->f_files = 999999999; + buf->f_ffree = 999999999; + return 0; +} + static int processing_init(void) { pthread_mutex_init(&lock, NULL); @@ -1782,6 +1796,7 @@ static struct fuse_cache_operations sshfs_oper = { .release = sshfs_release, .read = sshfs_read, .write = sshfs_write, + .statfs = sshfs_statfs, }, .cache_getdir = sshfs_getdir, }; -- cgit v1.2.3