song: check file type in song_file_update()

Don't load non-regular files.
This commit is contained in:
Max Kellermann 2008-10-15 22:43:24 +02:00
parent 8c0060fae4
commit f1ab4d2c1b

View File

@ -108,7 +108,7 @@ song_file_update(struct song *song)
song->tag = NULL;
}
if (stat(abs_path, &st) < 0)
if (stat(abs_path, &st) < 0 || !S_ISREG(st.st_mode))
return false;
song->mtime = st.st_mtime;