--- sshfs-fuse-2.2/sshfs.c 2008-10-20 13:10:08.000000000 +0100 +++ sshfs-fuse-2.2-new/sshfs.c 2010-05-28 23:08:50.724000000 +0100 @@ -2257,16 +2257,17 @@ static int sshfs_release(const char *path, struct fuse_file_info *fi) { + int err = 0; struct sshfs_file *sf = get_sshfs_file(fi); struct buffer *handle = &sf->handle; if (sshfs_file_is_conn(sf)) { sshfs_flush(path, fi); - sftp_request(SSH_FXP_CLOSE, handle, 0, NULL); + err = sftp_request(SSH_FXP_CLOSE, handle, SSH_FXP_STATUS, NULL); } buf_free(handle); chunk_put_locked(sf->readahead); sshfs_file_put(sf); - return 0; + return err; } static int sshfs_sync_read(struct sshfs_file *sf, char *rbuf, size_t size,