summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2008-02-25 13:00:24 +0100
committerVolker Lendecke <vl@samba.org>2008-02-25 13:05:18 +0100
commitcd95385207ff2a9c27031dcff19b7b74df3a626f (patch)
treedc60e4beb7407e138da0aa16c9d9845086f41088 /source3
parent43491db17c8f0b62f5bfdcb68a92feef651ed5d4 (diff)
downloadsamba-cd95385207ff2a9c27031dcff19b7b74df3a626f.tar.gz
samba-cd95385207ff2a9c27031dcff19b7b74df3a626f.tar.bz2
samba-cd95385207ff2a9c27031dcff19b7b74df3a626f.zip
Correctly check return of rename(2)
Bug 5279 -- Thanks to Max Matveev (This used to be commit 71641f04d4e9a41775e898f2e4ac3c8792783cd3)
Diffstat (limited to 'source3')
-rw-r--r--source3/modules/vfs_default.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source3/modules/vfs_default.c b/source3/modules/vfs_default.c
index cf135dfd03..31ebb6352a 100644
--- a/source3/modules/vfs_default.c
+++ b/source3/modules/vfs_default.c
@@ -468,7 +468,7 @@ static int vfswrap_rename(vfs_handle_struct *handle, const char *oldname, const
START_PROFILE(syscall_rename);
result = rename(oldname, newname);
- if (errno == EXDEV) {
+ if ((result == -1) && (errno == EXDEV)) {
/* Rename across filesystems needed. */
result = copy_reg(oldname, newname);
}