aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-10-15 22:43:24 +0200
committerMax Kellermann <max@duempel.org>2008-10-15 22:43:24 +0200
commitf1ab4d2c1ba881337dd6fc3ce57306c7f94153e2 (patch)
tree8dfde9ceca29a469c7f68547bc479c0c64c36d48
parent8c0060fae44a94bdfe978d8d4a66589f5a03a074 (diff)
downloadmpd-f1ab4d2c1ba881337dd6fc3ce57306c7f94153e2.tar.gz
mpd-f1ab4d2c1ba881337dd6fc3ce57306c7f94153e2.tar.xz
mpd-f1ab4d2c1ba881337dd6fc3ce57306c7f94153e2.zip
song: check file type in song_file_update()
Don't load non-regular files.
Diffstat (limited to '')
-rw-r--r--src/song.c2
1 files changed, 1 insertions, 1 deletions
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;