aboutsummaryrefslogtreecommitdiffstats
path: root/src/update.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-10-09 19:17:26 +0200
committerMax Kellermann <max@duempel.org>2008-10-09 19:17:26 +0200
commitb4f1b20fd9ff95e89eed1a14abef69d740ba6f51 (patch)
treeca4bcbfb2143827a48f082864df35dc7b6cb2040 /src/update.c
parent84b52265a604f7cfebf4a6d9b34a6efa007cd1d4 (diff)
downloadmpd-b4f1b20fd9ff95e89eed1a14abef69d740ba6f51.tar.gz
mpd-b4f1b20fd9ff95e89eed1a14abef69d740ba6f51.tar.xz
mpd-b4f1b20fd9ff95e89eed1a14abef69d740ba6f51.zip
updated: always call removeDeletedFromDirectory()
Removed the local variable "was_empty": don't remember if the directory is new. Always call removeDeletedFromDirectory().
Diffstat (limited to '')
-rw-r--r--src/update.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/update.c b/src/update.c
index 412f6c5ed..63d28895a 100644
--- a/src/update.c
+++ b/src/update.c
@@ -285,7 +285,6 @@ static int skip_path(const char *path)
static enum update_return
updateDirectory(struct directory *directory, const struct stat *st)
{
- bool was_empty = directory_is_empty(directory);
DIR *dir;
const char *dirname = directory_get_path(directory);
struct dirent *ent;
@@ -300,8 +299,7 @@ updateDirectory(struct directory *directory, const struct stat *st)
if (!dir)
return UPDATE_RETURN_ERROR;
- if (!was_empty &&
- removeDeletedFromDirectory(path_max_tmp, directory) > 0)
+ if (removeDeletedFromDirectory(path_max_tmp, directory) > 0)
ret = UPDATE_RETURN_UPDATED;
while ((ent = readdir(dir))) {