From b80c6b0863127da4511abf2ebb1f9328db5730aa Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Mon, 24 Jan 2005 11:02:59 +0000 Subject: users/8422: [[ ... -nt ... ]] with bad stat caused mayhem in initialisation files, functions, etc. --- ChangeLog | 7 +++++++ Src/cond.c | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 9285ce159..61523ad2b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2005-01-24 Peter Stephenson + + * users/8422: Src/cond.c: [[ ... -nt ... ]] and [[ ... -ot ... ]] + with non-existent files (or any failed state) were recorded + as errors, causing initialisation scripts, functions, etc., etc. + to exit. + 2005-01-23 Clint Adams * 20737, 20739: Completion/Unix/Command/_subversion: run svn diff --git a/Src/cond.c b/Src/cond.c index a720ec69a..aa808715f 100644 --- a/Src/cond.c +++ b/Src/cond.c @@ -336,7 +336,7 @@ evalcond(Estate state, char *fromtest) return 1; a = st->st_mtime; if (!(st = getstat(right))) - return 2; + return 1; return !((ctype == COND_NT) ? a > st->st_mtime : a < st->st_mtime); } case COND_EF: -- cgit 1.4.1