diff options
author | Max Kellermann <max@duempel.org> | 2008-10-09 19:17:26 +0200 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2008-10-11 19:21:51 -0700 |
commit | 0d4cc41ae07ca3f2e079fced38d9bd244c787df8 (patch) | |
tree | 2c32e4f618d0a42519cef5ca4729954735e89697 /src | |
parent | 516540ba565d47c79ac18f8bfe395e0d38598fea (diff) | |
download | mpd-0d4cc41ae07ca3f2e079fced38d9bd244c787df8.tar.gz mpd-0d4cc41ae07ca3f2e079fced38d9bd244c787df8.tar.xz mpd-0d4cc41ae07ca3f2e079fced38d9bd244c787df8.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 'src')
-rw-r--r-- | src/update.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/update.c b/src/update.c index 69ae9794d..4498449bd 100644 --- a/src/update.c +++ b/src/update.c @@ -271,7 +271,6 @@ static int skip_path(const char *path) static enum update_return updateDirectory(struct directory *directory, const struct stat *st) { - int was_empty = directory_is_empty(directory); DIR *dir; const char *dirname = directory_get_path(directory); struct dirent *ent; @@ -287,8 +286,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))) { |