MP3 player file path clean up

This commit is contained in:
Mateusz Faderewski 2023-07-28 21:25:22 +02:00
parent 17fde21b6f
commit da50cd93d0

View File

@ -2,6 +2,7 @@
#include <libdragon.h> #include <libdragon.h>
#include "mp3_player.h" #include "mp3_player.h"
#include "utils/fs.h"
#include "utils/utils.h" #include "utils/utils.h"
#define MINIMP3_IMPLEMENTATION #define MINIMP3_IMPLEMENTATION
@ -153,7 +154,7 @@ mp3player_err_t mp3player_load (char *path) {
mp3player_unload(); mp3player_unload();
} }
if (f_open(&p->fil, path, FA_READ) != FR_OK) { if (f_open(&p->fil, strip_sd_prefix(path), FA_READ) != FR_OK) {
return MP3PLAYER_ERR_IO; return MP3PLAYER_ERR_IO;
} }