From f1ab4d2c1ba881337dd6fc3ce57306c7f94153e2 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 15 Oct 2008 22:43:24 +0200 Subject: song: check file type in song_file_update() Don't load non-regular files. --- src/song.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/song.c b/src/song.c index 9bc44f4a0..d99b3a29f 100644 --- a/src/song.c +++ b/src/song.c @@ -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; -- cgit v1.2.3