Commit 6270ed2f authored by Matt Johnston's avatar Matt Johnston
Browse files

Fix compat basename() to handle paths with no slashes. Thanks to Frank Teo

parent 80e77b5e
......@@ -193,6 +193,10 @@ int daemon(int nochdir, int noclose) {
char *basename(const char *path) {
char *foo = strrchr(path, '/');
if (!foo)
return path;
return ++foo;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment