aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--sshfs.c7
2 files changed, 12 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index c855c7d..f694fd0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2014-01-07 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Map SSH2_FX_FAILURE to ENOTEMPTY for rmdir. Reported by Ross
+ Lagerwall
+
2012-05-14 Miklos Szeredi <miklos@szeredi.hu>
* When checking root directory use LSTAT not STAT. This prevents
diff --git a/sshfs.c b/sshfs.c
index 125a368..4d322f7 100644
--- a/sshfs.c
+++ b/sshfs.c
@@ -1790,6 +1790,13 @@ static int sftp_request_wait(struct request *req, uint8_t type,
err = -EIO;
break;
+ case SSH_FX_FAILURE:
+ if (type == SSH_FXP_RMDIR)
+ err = -ENOTEMPTY;
+ else
+ err = -EPERM;
+ break;
+
default:
err = -sftp_error_to_errno(serr);
}