]> granicus.if.org Git - mutt/commitdiff
mutt_basename() was garbage.
authorThomas Roessler <roessler@does-not-exist.org>
Sat, 4 Oct 2003 22:12:10 +0000 (22:12 +0000)
committerThomas Roessler <roessler@does-not-exist.org>
Sat, 4 Oct 2003 22:12:10 +0000 (22:12 +0000)
lib.c

diff --git a/lib.c b/lib.c
index 4c6a4b5b30ab7aea13cf205e56b2496fcc266339..33d57571e3b8e9d07d89137bdf50096c053a559a 100644 (file)
--- a/lib.c
+++ b/lib.c
@@ -650,6 +650,8 @@ char *mutt_concat_path (char *d, const char *dir, const char *fname, size_t l)
 const char *mutt_basename (const char *f)
 {
   const char *p = strrchr (f, '/');
-  if (p) ++p;
-  return p;
+  if (p)
+    return p + 1;
+  else
+    return f;
 }