From e327acece45bfb1c17ad6c41e8e4b6d388aa6287 Mon Sep 17 00:00:00 2001 From: Martin Pool Date: Wed, 8 Nov 2000 09:32:11 +0000 Subject: [PATCH] Better error messages when unlink fails --- receiver.c | 5 +++-- rsync.c | 8 ++++---- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/receiver.c b/receiver.c index e5baa339..7be95889 100644 --- a/receiver.c +++ b/receiver.c @@ -1,5 +1,6 @@ -/* - Copyright (C) Andrew Tridgell 1996 +/* -*- c-file-style: "linux" -*- + + Copyright (C) 1996-2000 by Andrew Tridgell Copyright (C) Paul Mackerras 1996 This program is free software; you can redistribute it and/or modify diff --git a/rsync.c b/rsync.c index 44d54dac..5ee50c08 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; } @@ -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; } -- 2.34.1