From eef0943c0efc2e4260e09eb7f9fee143b80f4114 Mon Sep 17 00:00:00 2001 From: Asanka Herath Date: Fri, 24 Jul 2009 02:27:30 -0400 Subject: [PATCH] (compile_et.c) Pick the last path delimiter whichever kind of slash it is --- lib/com_err/compile_et.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/lib/com_err/compile_et.c b/lib/com_err/compile_et.c index 500663af9..199ef94be 100644 --- a/lib/com_err/compile_et.c +++ b/lib/com_err/compile_et.c @@ -221,8 +221,16 @@ main(int argc, char **argv) p = strrchr(filename, '/'); #ifdef BACKSLASH_PATH_DELIM - if (!p) - p = strrchr(filename, '\\'); + { + char * bs = strrchr(filename, '\\'); + + if (p) { + if (p < bs) + p = bs; + } else { + p = bs; + } + } #endif if(p) p++;