update_walk: log unrecognized files

When a song's tags could not be loaded during database update, log
this as a debug message.  Same for a song being removed because its
updated tag could not be read.
This commit is contained in:
Max Kellermann 2009-11-05 08:01:29 +01:00
parent e96dc9a14c
commit 4ec25b5d64

View File

@ -530,8 +530,11 @@ update_regular_file(struct directory *directory,
if (song == NULL) {
song = song_file_load(name, directory);
if (song == NULL)
if (song == NULL) {
g_debug("ignoring unrecognized file %s/%s",
directory_get_path(directory), name);
return;
}
songvec_add(&directory->songs, song);
modified = true;
@ -540,8 +543,12 @@ update_regular_file(struct directory *directory,
} else if (st->st_mtime != song->mtime || walk_discard) {
g_message("updating %s/%s",
directory_get_path(directory), name);
if (!song_file_update(song))
if (!song_file_update(song)) {
g_debug("deleting unrecognized file %s/%s",
directory_get_path(directory), name);
delete_song(directory, song);
}
modified = true;
}
#ifdef ENABLE_ARCHIVE