aboutsummaryrefslogtreecommitdiff
path: root/sshfs.c
diff options
context:
space:
mode:
authorRian Hunter <rianhunter@users.noreply.github.com>2018-06-20 22:31:53 +0300
committerNikolaus Rath <Nikolaus@rath.org>2018-06-20 20:31:53 +0100
commitfc7a57f0dc837ad163192def1cf676cdb3a490c0 (patch)
treed8cd575a05758ac850baed04eb607f2d2b26ca72 /sshfs.c
parentf0452119e0e5365bd140e8dd47ff268d274f55de (diff)
downloadsshfs-fc7a57f0dc837ad163192def1cf676cdb3a490c0.tar
sshfs-fc7a57f0dc837ad163192def1cf676cdb3a490c0.tar.gz
sshfs-fc7a57f0dc837ad163192def1cf676cdb3a490c0.tar.bz2
sshfs-fc7a57f0dc837ad163192def1cf676cdb3a490c0.zip
Correct workaround condition for not using handle in sshfs_getattr (#127)
In libfuse<3, when `fstat_workaround` was true, that meant to always use the `path` argument to resolve fgetattr instead of the supplied handle. Before this change, the logic was interpreting `fstat_workaround` to not use the `path` argument when it was true. This change reverts to the libfuse<3 behavior.
Diffstat (limited to 'sshfs.c')
-rw-r--r--sshfs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sshfs.c b/sshfs.c
index e62c45a..5ae54c5 100644
--- a/sshfs.c
+++ b/sshfs.c
@@ -3158,7 +3158,7 @@ static int sshfs_getattr(const char *path, struct stat *stbuf,
struct buffer outbuf;
struct sshfs_file *sf = NULL;
- if (fi != NULL || sshfs.fstat_workaround) {
+ if (fi != NULL && !sshfs.fstat_workaround) {
sf = get_sshfs_file(fi);
if (!sshfs_file_is_conn(sf))
return -EIO;