aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-10-09 19:11:49 +0200
committerMax Kellermann <max@duempel.org>2008-10-09 19:11:49 +0200
commit08c1322089819131e4dfb74e0a62ee1898993744 (patch)
tree029e0c489fa11d93050c8d86b4a95fcd1985e981
parent6b9ffcffe2c255a918398e58418466529d362da9 (diff)
downloadmpd-08c1322089819131e4dfb74e0a62ee1898993744.tar.gz
mpd-08c1322089819131e4dfb74e0a62ee1898993744.tar.xz
mpd-08c1322089819131e4dfb74e0a62ee1898993744.zip
update: never pass root path to updatePath()
update_task() already checks if it has got a root path. Extend this check and in turn remove a check in the inner function updatePath().
Diffstat (limited to '')
-rw-r--r--src/update.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/update.c b/src/update.c
index 3aae95d25..57b54c444 100644
--- a/src/update.c
+++ b/src/update.c
@@ -392,11 +392,6 @@ static enum update_return updatePath(const char *path)
directory_sort(directory);
return ret;
}
- /* we don't want to delete the root directory */
- else if (directory == db_get_root()) {
- clear_directory(directory);
- return UPDATE_RETURN_NOUPDATE;
- }
/* if updateDirectory fails, means we should delete it */
else {
LOG("removing directory: %s\n", path);
@@ -456,7 +451,7 @@ static void * update_task(void *_path)
{
enum update_return ret = UPDATE_RETURN_NOUPDATE;
- if (_path) {
+ if (_path != NULL && !isRootDirectory(_path)) {
ret = updatePath((char *)_path);
free(_path);
} else {