From 6480b66bd64a2d2f58db6fc0a3320f4464f4669e Mon Sep 17 00:00:00 2001 From: Quentin Rameau Date: Wed, 25 Jul 2018 10:59:43 +0100 Subject: Fix error return value from rename() Fuse operations expect negated errno values. --- ChangeLog.rst | 5 +++++ sshfs.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog.rst b/ChangeLog.rst index 1563ea5..368d2cd 100644 --- a/ChangeLog.rst +++ b/ChangeLog.rst @@ -1,3 +1,8 @@ +Unreleased Changes +------------------ + +* Fixed error code returned by rename(), allowing proper fallback. + Release 3.4.0 (2018-06-29) -------------------------- diff --git a/sshfs.c b/sshfs.c index 5ae54c5..a6e7bf2 100644 --- a/sshfs.c +++ b/sshfs.c @@ -2316,7 +2316,7 @@ static int sshfs_rename(const char *from, const char *to, unsigned int flags) int err; if(flags != 0) - return EINVAL; + return -EINVAL; if (sshfs.ext_posix_rename) err = sshfs_ext_posix_rename(from, to); -- cgit v1.2.3