summaryrefslogtreecommitdiffstats
path: root/lib.c
diff options
context:
space:
mode:
authorThomas Roessler <roessler@does-not-exist.org>2003-10-04 22:12:10 +0000
committerThomas Roessler <roessler@does-not-exist.org>2003-10-04 22:12:10 +0000
commit6fdcf1fab09445e39a677339994bb4edd3b6b119 (patch)
treeec3b6857739ca4ad0a6f40b0fdc58ac1859df327 /lib.c
parent9b6d1835ffc0199210754174ef0dadf92230ed2c (diff)
mutt_basename() was garbage.
Diffstat (limited to 'lib.c')
-rw-r--r--lib.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib.c b/lib.c
index 4c6a4b5b..33d57571 100644
--- 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;
}