From 08c1322089819131e4dfb74e0a62ee1898993744 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 9 Oct 2008 19:11:49 +0200 Subject: 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(). --- src/update.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'src/update.c') 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 { -- cgit v1.2.3