Skip to content

Commit fc7a57f

Browse files
rianhunterNikratio
authored andcommitted
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.
1 parent f045211 commit fc7a57f

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

ChangeLog.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ Unreleased Changes
44
* Make utimens(NULL) result in timestamp "now" -- no more touched files
55
dated 1970-01-01
66
* New `createmode` workaround.
7+
* Fix `fstat` workaround regression.
78

89
Release 3.3.2 (2018-04-29)
910
--------------------------

sshfs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3158,7 +3158,7 @@ static int sshfs_getattr(const char *path, struct stat *stbuf,
31583158
struct buffer outbuf;
31593159
struct sshfs_file *sf = NULL;
31603160

3161-
if (fi != NULL || sshfs.fstat_workaround) {
3161+
if (fi != NULL && !sshfs.fstat_workaround) {
31623162
sf = get_sshfs_file(fi);
31633163
if (!sshfs_file_is_conn(sf))
31643164
return -EIO;

0 commit comments

Comments
 (0)