From db758fb11167c79d9682a17d359568e2a3c4acd5 Mon Sep 17 00:00:00 2001 From: Peter Seebach Date: Mon, 4 May 2015 14:21:05 -0500 Subject: reduce spurious messages about trailing slashes There was supposed to be a check for filenames showing up with a trailing slash when the file was not a directory. What actually made it in was a check for a mismatch between "is a directory" and "has trailing slash", which produced spurious messages saying the path had a trailing slash whenever a directory path did *not* have a trailing slash. But that's valid and should not produce diagnostics. Let alone thousands of diagnostics. Signed-off-by: Peter Seebach --- ChangeLog.txt | 4 ++++ Makefile.in | 2 +- pseudo.c | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ChangeLog.txt b/ChangeLog.txt index bda0903..08dbd4d 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -1,3 +1,7 @@ +2015-05-04: + * (seebs) don't give spurious trailing slash diagnostics + * 1.6.5 + 2015-01-22: * (seebs) work when --prefix doesn't exist yet * 1.6.4 diff --git a/Makefile.in b/Makefile.in index 20571b6..f4e9cac 100644 --- a/Makefile.in +++ b/Makefile.in @@ -31,7 +31,7 @@ BITS=@BITS@ ARCH_FLAGS=@ARCH_FLAGS@ MARK64=@MARK64@ RPATH=@RPATH@ -VERSION=1.6.4 +VERSION=1.6.5 LIB=@LIB@ BIN=bin diff --git a/pseudo.c b/pseudo.c index 5eae180..c089869 100644 --- a/pseudo.c +++ b/pseudo.c @@ -682,7 +682,7 @@ pseudo_op(pseudo_msg_t *msg, const char *program, const char *tag, char **respon pdb_unlink_file_dev(&by_path); found_path = 0; } - if (!!S_ISDIR(by_path.mode) != trailing_slash) { + if (trailing_slash && !S_ISDIR(by_path.mode)) { pseudo_diag("dir quasi-mismatch: '%s' [%llu] db mode 0%o, incoming path had trailing slash. Not unlinking.\n", msg->path, (unsigned long long) by_path.ino, (int) by_path.mode); -- cgit