Skip to content

Commit

Permalink
Correct workaround condition for not using handle in sshfs_getattr (l…
Browse files Browse the repository at this point in the history
…ibfuse#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.
  • Loading branch information
rianhunter authored and Nikratio committed Jun 20, 2018
1 parent f045211 commit fc7a57f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions ChangeLog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ Unreleased Changes
* Make utimens(NULL) result in timestamp "now" -- no more touched files
dated 1970-01-01
* New `createmode` workaround.
* Fix `fstat` workaround regression.

Release 3.3.2 (2018-04-29)
--------------------------
Expand Down
2 changes: 1 addition & 1 deletion sshfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit fc7a57f

Please sign in to comment.