diff options
author | Max Kellermann <max@duempel.org> | 2008-10-15 22:43:24 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2008-10-15 22:43:24 +0200 |
commit | f1ab4d2c1ba881337dd6fc3ce57306c7f94153e2 (patch) | |
tree | 8dfde9ceca29a469c7f68547bc479c0c64c36d48 | |
parent | 8c0060fae44a94bdfe978d8d4a66589f5a03a074 (diff) | |
download | mpd-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.c | 2 |
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; |