Commit 1b364e7f authored by Dominik Widhalm's avatar Dominik Widhalm
Browse files

Bugfix in task6.06

parent 5f764ebe
......@@ -187,8 +187,12 @@ int songs_scan (song_t **head, char *dir) {
}
/* Get the file extension */
char *ext = strrchr(file->d_name,'.');
/* Check if file has an extension */
if (ext == NULL) {
/* Continue with next directory entry */
continue;
/* Check if the file is a .MP3 or .mp3 file */
if (strcmp(ext,".MP3") && strcmp(ext,".mp3")) {
} else if (strcmp(ext,".MP3") && strcmp(ext,".mp3")) {
/* Continue with next directory entry */
continue;
}
......
Supports Markdown
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