Matt McCutchen's Web Site
/
rsync
/
rsync.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Clear up conditions for running as root.
[rsync/rsync.git]
/
backup.c
diff --git
a/backup.c
b/backup.c
index
9c6fd89
..
8c1d767
100644
(file)
--- a/
backup.c
+++ b/
backup.c
@@
-197,7
+197,10
@@
static int keep_backup(char *fname)
if (do_stat (fname, &st)) return 1;
#endif
if (do_stat (fname, &st)) return 1;
#endif
- file = make_file (-1, fname, 0);
+ file = make_file(-1, fname, NULL, 1);
+
+ /* the file could have disappeared */
+ if (!file) return 1;
/* make a complete pathname for backup file */
if (strlen(backup_dir) + strlen(fname) > (MAXPATHLEN - 1)) {
/* make a complete pathname for backup file */
if (strlen(backup_dir) + strlen(fname) > (MAXPATHLEN - 1)) {