Commit f1ab4d2c authored by Max Kellermann's avatar Max Kellermann

song: check file type in song_file_update()

Don't load non-regular files.
parent 8c0060fa
...@@ -108,7 +108,7 @@ song_file_update(struct song *song) ...@@ -108,7 +108,7 @@ song_file_update(struct song *song)
song->tag = NULL; song->tag = NULL;
} }
if (stat(abs_path, &st) < 0) if (stat(abs_path, &st) < 0 || !S_ISREG(st.st_mode))
return false; return false;
song->mtime = st.st_mtime; song->mtime = st.st_mtime;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment