From 4c7c0976ac8743d0b934b07f59ba9448a76dbac1 Mon Sep 17 00:00:00 2001 From: Andreas Gruenbacher Date: Mon, 17 Sep 2012 23:31:08 +0200 Subject: Improve error message when patching a file of different type * src/inp.c (get_input_file): Improve error message when patching a file of different type. * tests/symlinks: Update test case. --- src/inp.c | 2 +- tests/symlinks | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/inp.c b/src/inp.c index dbc3f5d..7b80d71 100644 --- a/src/inp.c +++ b/src/inp.c @@ -198,7 +198,7 @@ get_input_file (char const *filename, char const *outname, mode_t mode) else if (! ((S_ISREG (mode) || S_ISLNK (mode)) && (mode & S_IFMT) == (instat.st_mode & S_IFMT))) { - say ("File %s is not a %s -- can't patch\n", + say ("File %s is not a %s -- refusing to patch\n", quotearg (filename), S_ISLNK (mode) ? "symbolic link" : "regular file"); return false; diff --git a/tests/symlinks b/tests/symlinks index f21a76d..5f7595d 100644 --- a/tests/symlinks +++ b/tests/symlinks @@ -26,7 +26,7 @@ echo one > f ncheck 'ln -s f l' check 'patch < create.diff || echo "Status: $?"' < modify.diff < delete.diff <