summaryrefslogtreecommitdiff
path: root/extmod/vfs_lfsx.c
diff options
context:
space:
mode:
authorDamien George <damien@micropython.org>2025-05-13 12:54:47 +1000
committerDamien George <damien@micropython.org>2025-05-15 13:09:49 +1000
commit62d26bfc15840b6bc172a081066931b2fce6a696 (patch)
tree73286985f91888c3d22a71708091d358c37ffe14 /extmod/vfs_lfsx.c
parent420897045171305fa36440c08b575ebe3f6d4ef8 (diff)
extmod/vfs_lfsx: Fix errno value raised from chdir.
OSError errno values should be positive. Signed-off-by: Damien George <damien@micropython.org>
Diffstat (limited to 'extmod/vfs_lfsx.c')
-rw-r--r--extmod/vfs_lfsx.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/extmod/vfs_lfsx.c b/extmod/vfs_lfsx.c
index 4b10ca3aa..404eab84f 100644
--- a/extmod/vfs_lfsx.c
+++ b/extmod/vfs_lfsx.c
@@ -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);
}
}