git.samba.org
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
51f3150
)
Correctly check return of rename(2)
author
Volker Lendecke
<vl@samba.org>
Mon, 25 Feb 2008 12:00:24 +0000
(13:00 +0100)
committer
Volker Lendecke
<vl@samba.org>
Mon, 25 Feb 2008 12:04:30 +0000
(13:04 +0100)
Bug 5279 -- Thanks to Max Matveev
source/modules/vfs_default.c
patch
|
blob
|
history
diff --git
a/source/modules/vfs_default.c
b/source/modules/vfs_default.c
index 98e9aaa2631754a6bb9f6c8e7b3cab41de7e169a..4cc6e8856b6055e2e64f55e19ccf07cac613d2d4 100644
(file)
--- a/
source/modules/vfs_default.c
+++ b/
source/modules/vfs_default.c
@@
-444,7
+444,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);
}