diff options
Diffstat (limited to 'extmod')
| -rw-r--r-- | extmod/vfs_fat_file.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/extmod/vfs_fat_file.c b/extmod/vfs_fat_file.c index 3ea9cee52..422f057a8 100644 --- a/extmod/vfs_fat_file.c +++ b/extmod/vfs_fat_file.c @@ -28,6 +28,7 @@ #if MICROPY_VFS && MICROPY_VFS_FAT #include <stdio.h> +#include <string.h> #include "py/runtime.h" #include "py/stream.h" @@ -199,7 +200,7 @@ STATIC mp_obj_t file_open(fs_user_mount_t *vfs, const mp_obj_type_t *type, mp_ar FRESULT res = f_open(&vfs->fatfs, &o->fp, fname, mode); if (res != FR_OK) { m_del_obj(pyb_file_obj_t, o); - mp_raise_OSError(fresult_to_errno_table[res]); + mp_raise_OSError_errno_str(fresult_to_errno_table[res], args[0].u_obj); } // If we're reading, turn on fast seek. if (mode == FA_READ) { |
