aboutsummaryrefslogtreecommitdiffstats
path: root/src/update.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-10-08 11:55:52 +0200
committerEric Wong <normalperson@yhbt.net>2008-10-11 19:21:49 -0700
commit0c46207db41840ac70af7a5261969e865b748f1d (patch)
tree689cbe236d6189c2ae6e47b6c2459a8c8f76b9e6 /src/update.c
parent313e8e3ecc15e65700e64252207227612d6d9195 (diff)
downloadmpd-0c46207db41840ac70af7a5261969e865b748f1d.tar.gz
mpd-0c46207db41840ac70af7a5261969e865b748f1d.tar.xz
mpd-0c46207db41840ac70af7a5261969e865b748f1d.zip
directory: fix update in root directory
Commit 0bfe7802 broke update for new files in the root directory, because music_root->path was an empty string and not NULL. There were some NULL tests missing. Change them to !isRootDirectory(path) instead of path!=NULL.
Diffstat (limited to 'src/update.c')
-rw-r--r--src/update.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/update.c b/src/update.c
index 989b8f943..1cf6f3537 100644
--- a/src/update.c
+++ b/src/update.c
@@ -283,7 +283,7 @@ enum update_return updateDirectory(struct directory *directory)
if (!utf8)
continue;
- if (directory->path)
+ if (!isRootDirectory(directory->path))
utf8 = pfx_dir(path_max_tmp, utf8, strlen(utf8),
dirname, strlen(dirname));
if (was_empty) {