From 96aa7a36d2fc4836abbfa2d9ddd5bd1059b21e58 Mon Sep 17 00:00:00 2001 From: robert Date: Wed, 29 Apr 2020 17:44:47 +0200 Subject: [PATCH] extmod/vfs_lfsx.c: fix path handling in uos.stat() for lfs This fixes the bug, that stat(filename) would not consider the actual directory. So if e.g. the cwd is "lib", then stat("main.py") would return the info for "/main.py" instead of "/lib/main.py". And vice versa it would not return the info for a file in that directory, if just the filename was give. But still, path names with . or .. will fail. That fix will come separately. --- extmod/vfs_lfsx.c | 2 +- lib/btstack | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/extmod/vfs_lfsx.c b/extmod/vfs_lfsx.c index b381056b8181a..9474e960fc8d6 100644 --- a/extmod/vfs_lfsx.c +++ b/extmod/vfs_lfsx.c @@ -304,7 +304,7 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_1(MP_VFS_LFSx(getcwd_obj), MP_VFS_LFSx(getcwd)); STATIC mp_obj_t MP_VFS_LFSx(stat)(mp_obj_t self_in, mp_obj_t path_in) { MP_OBJ_VFS_LFSx *self = MP_OBJ_TO_PTR(self_in); - const char *path = mp_obj_str_get_str(path_in); + const char *path = MP_VFS_LFSx(make_path)(self, path_in); struct LFSx_API (info) info; int ret = LFSx_API(stat)(&self->lfs, path, &info); if (ret < 0) { diff --git a/lib/btstack b/lib/btstack index 8ffc7c281ad1e..a6121b51b229b 160000 --- a/lib/btstack +++ b/lib/btstack @@ -1 +1 @@ -Subproject commit 8ffc7c281ad1e8cc66523c49209ba885aa3f919f +Subproject commit a6121b51b229b883431c4a1600b0f46db31d32dc pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy