aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/dirvec.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/dirvec.c b/src/dirvec.c
index 7f495b3fe..72b1c0084 100644
--- a/src/dirvec.c
+++ b/src/dirvec.c
@@ -1,6 +1,7 @@
#include "dirvec.h"
#include "directory.h"
#include "utils.h"
+#include "path.h"
#include <string.h>
@@ -26,8 +27,10 @@ struct directory *dirvec_find(const struct dirvec *dv, const char *path)
{
int i;
+ path = mpd_basename(path);
+
for (i = dv->nr; --i >= 0; )
- if (!strcmp(dv->base[i]->path, path))
+ if (!strcmp(directory_get_name(dv->base[i]), path))
return dv->base[i];
return NULL;
}