diff options
| author | Wayne Davison <wayned@samba.org> | 2004-03-13 20:18:03 +0000 |
|---|---|---|
| committer | Wayne Davison <wayned@samba.org> | 2004-03-13 20:18:03 +0000 |
| commit | 3d061653890e25fd95186d521a2d1dc5ea4d76e7 (patch) | |
| tree | 7de3008fc241bf123ad417db043a470159985b5d /backup.c | |
| parent | fd4893155d5226d32f350d15cc3e29beec677f39 (diff) | |
| download | android_external_rsync-3d061653890e25fd95186d521a2d1dc5ea4d76e7.tar.gz android_external_rsync-3d061653890e25fd95186d521a2d1dc5ea4d76e7.tar.bz2 android_external_rsync-3d061653890e25fd95186d521a2d1dc5ea4d76e7.zip | |
Check robust_rename()'s return value using < 0.
Diffstat (limited to 'backup.c')
| -rw-r--r-- | backup.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -130,8 +130,8 @@ failure: /* robustly move a file, creating new directory structures if necessary */ static int robust_move(char *src, char *dst) { - if (robust_rename(src, dst, 0755) != 0 && (errno != ENOENT - || make_bak_dir(dst) < 0 || robust_rename(src, dst, 0755) != 0)) + if (robust_rename(src, dst, 0755) < 0 && (errno != ENOENT + || make_bak_dir(dst) < 0 || robust_rename(src, dst, 0755) < 0)) return -1; return 0; } |
