micropython/extmod
Christian Walther be28829ae8 extmod/vfs_posix: Fix getcwd() on non-root VFS.
The unwritten API contract expected of a VFS.getcwd() by mp_vfs_getcwd()
is that its return value should be either "" or "/" when the CWD is at
the root of the VFS and otherwise start with a slash and not end with a
slash. This was not correctly implemented in VfsPosix for instances with
a non-empty root - the required leading slash, if any, was cut off
because the root length includes a trailing slash. This would result in
missing slashes in the middle of the return value of os.getcwd() or in
uninitialized garbage from beyond a string's null terminator when the
CWD was at the VFS root.

Signed-off-by: Christian Walther <cwalther@gmx.ch>
2023-10-19 16:21:09 +02:00
..
asyncio extmod/asyncio: Emit errors to stderr, not stdout. 2023-10-13 14:55:54 +11:00
axtls-include
btstack
lwip-include
mbedtls
nimble
extmod.cmake
extmod.mk
font_petme128_8x8.h
machine_bitstream.c
machine_bitstream.h
machine_i2c.c
machine_i2c.h
machine_mem.c
machine_mem.h
machine_pinbase.c
machine_pinbase.h
machine_pulse.c
machine_pulse.h
machine_pwm.c
machine_pwm.h
machine_signal.c
machine_signal.h
machine_spi.c
machine_spi.h
machine_timer.c
misc.h
modasyncio.c
modbinascii.c
modbluetooth.c
modbluetooth.h
modbtree.c
modcryptolib.c
moddeflate.c
modframebuf.c extmod/modframebuf: Remove FrameBuffer1 from natmod build. 2023-10-16 12:18:43 +11:00
modhashlib.c
modheapq.c
modjson.c
modlwip.c
modnetwork.c
modnetwork.h
modonewire.c
modos.c
modplatform.c
modplatform.h
modrandom.c
modre.c
modselect.c
modsocket.c
modssl_axtls.c
modssl_mbedtls.c
modtime.c
modtime.h
moductypes.c extmod/moductypes: Validate that uctypes.struct addr argument is an int. 2023-10-12 15:47:15 +11:00
modwebrepl.c
modwebsocket.c
modwebsocket.h
mpbthci.c
mpbthci.h
network_cyw43.c
network_cyw43.h
network_esp_hosted.c
network_lwip.c
network_ninaw10.c
network_wiznet5k.c
os_dupterm.c
utime_mphal.h
vfs.c
vfs.h
vfs_blockdev.c
vfs_fat.c
vfs_fat.h
vfs_fat_diskio.c
vfs_fat_file.c
vfs_lfs.c
vfs_lfs.h
vfs_lfsx.c
vfs_lfsx_file.c
vfs_posix.c extmod/vfs_posix: Fix getcwd() on non-root VFS. 2023-10-19 16:21:09 +02:00
vfs_posix.h
vfs_posix_file.c
vfs_reader.c
virtpin.c
virtpin.h