X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/65d0a49f5c0d7f389ca1b2273f0a8ba306630a06..fcb69e5cdcfdfd0bdcea2127e5f4c9133a2282b9:/rsync.c diff --git a/rsync.c b/rsync.c index 63132672..3e50f38d 100644 --- a/rsync.c +++ b/rsync.c @@ -67,21 +67,21 @@ int delete_file(char *fname) if (!S_ISDIR(st.st_mode)) { if (robust_unlink(fname) == 0 || errno == ENOENT) return 0; - rprintf(FERROR,"unlink(%s) : %s\n", fname, strerror(errno)); + rprintf(FERROR,"delete_file: unlink(%s) : %s\n", fname, strerror(errno)); return -1; } if (do_rmdir(fname) == 0 || errno == ENOENT) return 0; if (!force_delete || !recurse || (errno != ENOTEMPTY && errno != EEXIST)) { - rprintf(FERROR,"rmdir(%s) : %s\n", fname, strerror(errno)); + rprintf(FERROR,"delete_file: rmdir(%s) : %s\n", fname, strerror(errno)); return -1; } /* now we do a recsursive delete on the directory ... */ d = opendir(fname); if (!d) { - rprintf(FERROR,"opendir(%s): %s\n", + rprintf(FERROR,"delete_file: opendir(%s): %s\n", fname,strerror(errno)); return -1; } @@ -91,7 +91,7 @@ int delete_file(char *fname) if (strcmp(dname,".")==0 || strcmp(dname,"..")==0) continue; - slprintf(buf, sizeof(buf), "%s/%s", fname, dname); + snprintf(buf, sizeof(buf), "%s/%s", fname, dname); if (verbose > 0) rprintf(FINFO,"deleting %s\n", buf); if (delete_file(buf) != 0) { @@ -103,7 +103,7 @@ int delete_file(char *fname) closedir(d); if (do_rmdir(fname) != 0) { - rprintf(FERROR,"rmdir(%s) : %s\n", fname, strerror(errno)); + rprintf(FERROR,"delete_file: rmdir(%s) : %s\n", fname, strerror(errno)); return -1; } @@ -162,7 +162,7 @@ int set_perms(char *fname,struct file_struct *file,STRUCT_STAT *st, } if (preserve_times && !S_ISLNK(st->st_mode) && - st->st_mtime != file->modtime) { + cmp_modtime(st->st_mtime, file->modtime) != 0) { /* don't complain about not setting times on directories because some filesystems can't do it */ if (set_modtime(fname,file->modtime) != 0 &&