diff options
author | Max Kellermann <max@duempel.org> | 2008-12-16 21:22:08 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2008-12-16 21:22:08 +0100 |
commit | e0be4400cf22a3bcb2a976a6b3d58183c0155b52 (patch) | |
tree | 5e5165a04ae0232e06e554f84dab78446826eb54 | |
parent | b765c62f2f4fdec585e1372765c4c4a076b9154c (diff) | |
download | mpd-e0be4400cf22a3bcb2a976a6b3d58183c0155b52.tar.gz mpd-e0be4400cf22a3bcb2a976a6b3d58183c0155b52.tar.xz mpd-e0be4400cf22a3bcb2a976a6b3d58183c0155b52.zip |
ls: don't return suffix from parent directory name
When a file had no file name extension, getSuffix() could return the
extension of the parent directory (if it had one).
Diffstat (limited to '')
-rw-r--r-- | src/ls.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -59,7 +59,7 @@ bool isRemoteUrl(const char *url) /* suffixes should be ascii only characters */ const char *getSuffix(const char *utf8file) { - const char *dot = strrchr(utf8file, '.'); + const char *dot = strrchr(g_basename(utf8file), '.'); return dot != NULL ? dot + 1 : NULL; } |