diff options
-rw-r--r-- | ChangeLog.rst | 8 | ||||
-rw-r--r-- | sshfs.c | 7 |
2 files changed, 15 insertions, 0 deletions
diff --git a/ChangeLog.rst b/ChangeLog.rst index f3f6352..37a4408 100644 --- a/ChangeLog.rst +++ b/ChangeLog.rst @@ -1,3 +1,11 @@ +Unreleased Changes +-------------------------- + +* Added a secondary check so if a mkdir request fails with EPERM an access request will be + tried - returning EEXIST if the access was successful. + Fixes: https://github.com/libfuse/sshfs/issues/243 + + Release 3.7.1 (2020-11-09) -------------------------- @@ -2377,6 +2377,13 @@ static int sshfs_mkdir(const char *path, mode_t mode) // Commutes with pending write(), so we can use any connection err = sftp_request(get_conn(NULL, NULL), SSH_FXP_MKDIR, &buf, SSH_FXP_STATUS, NULL); buf_free(&buf); + + if (err == -EPERM) { + if (sshfs.op->access(path, R_OK) == 0) { + return -EEXIST; + } + } + return err; } |