extmod/vfs_lfsx: Fix errno value raised from chdir.
OSError errno values should be positive. Signed-off-by: Damien George <damien@micropython.org>
This commit is contained in:
parent
4208970451
commit
62d26bfc15
1 changed files with 1 additions and 1 deletions
|
|
@ -300,7 +300,7 @@ static mp_obj_t MP_VFS_LFSx(chdir)(mp_obj_t self_in, mp_obj_t path_in) {
|
|||
struct LFSx_API (info) info;
|
||||
int ret = LFSx_API(stat)(&self->lfs, path, &info);
|
||||
if (ret < 0 || info.type != LFSx_MACRO(_TYPE_DIR)) {
|
||||
mp_raise_OSError(-MP_ENOENT);
|
||||
mp_raise_OSError(MP_ENOENT);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue