diff options
Diffstat (limited to '')
-rw-r--r-- | src/update.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/update.c b/src/update.c index 3a9dff87e..a1c0a2f25 100644 --- a/src/update.c +++ b/src/update.c @@ -250,12 +250,11 @@ static enum update_return updateInDirectory(struct directory *directory, const char *name, const struct stat *st) { - struct song *song; - if (S_ISREG(st->st_mode) && hasMusicSuffix(name, 0)) { const char *shortname = mpd_basename(name); + struct song *song = songvec_find(&directory->songs, shortname); - if (!(song = songvec_find(&directory->songs, shortname))) { + if (song == NULL) { song = song_file_load(shortname, directory); if (song == NULL) return -1; |