summaryrefslogtreecommitdiff
path: root/py/objtuple.c
diff options
context:
space:
mode:
authorChristian Walther <cwalther@gmx.ch>2023-07-30 14:48:22 +0200
committerChristian Walther <cwalther@gmx.ch>2023-10-19 16:21:09 +0200
commit0c4fb1687193a6c6f5edbb9404ecb7e5d6f3bec3 (patch)
treed649af465106230190f1e57808e7012828367ef6 /py/objtuple.c
parent5f7065f57a1ce445266a566685ad451edecc58c3 (diff)
extmod/vfs_posix: Fix relative paths on non-root VFS.
The unwritten API contract expected of a VFS by mp_vfs_lookup_path() is that paths passed in are relative to the root of the VFS if they start with '/' and relative to the current directory of the VFS otherwise. This was not correctly implemented in VfsPosix for instances with a non-empty root - all paths were interpreted relative to the root. Fix that. Since VfsPosix tracks its CWD using the "external" CWD of the Unix process, the correct handling for relative paths is to pass them through unmodified. Also, when concatenating absolute paths, fix an off-by-one resulting in a harmless double slash (the root path already has a trailing slash). Signed-off-by: Christian Walther <cwalther@gmx.ch>
Diffstat (limited to 'py/objtuple.c')
0 files changed, 0 insertions, 0 deletions