summaryrefslogtreecommitdiff
path: root/src/directory.c
diff options
context:
space:
mode:
authorWarren Dukes <warren.dukes@gmail.com>2004-11-12 18:02:26 +0000
committerWarren Dukes <warren.dukes@gmail.com>2004-11-12 18:02:26 +0000
commit9dc0b070f066d11bfa8de632980772b323a905e4 (patch)
tree158bf604e6f0b519f51e94a74619e7603004846d /src/directory.c
parent0473f3ea76c57be8b20e1fae628ec7ae7f04b5f7 (diff)
fix a bug in pringSongUrl, don't print leading '/' for songs in root dir
git-svn-id: https://svn.musicpd.org/mpd/trunk@2631 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to 'src/directory.c')
-rw-r--r--src/directory.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/directory.c b/src/directory.c
index d0ea403d0..7bd9b9f61 100644
--- a/src/directory.c
+++ b/src/directory.c
@@ -250,7 +250,7 @@ Directory * newDirectory(char * dirname, Directory * parent) {
directory = malloc(sizeof(Directory));
- if(dirname!=NULL) directory->path = strdup(dirname);
+ if(dirname && strlen(dirname)) directory->path = strdup(dirname);
else directory->path = NULL;
directory->subDirectories = newDirectoryList();
directory->songs = newSongList();