]> git.baikalelectronics.ru Git - uboot.git/commit
fs: fat: cannot write to subdirectories
authorHeinrich Schuchardt <xypron.glpk@gmx.de>
Mon, 2 Jul 2018 00:41:23 +0000 (02:41 +0200)
committerAlexander Graf <agraf@suse.de>
Wed, 25 Jul 2018 12:59:44 +0000 (14:59 +0200)
commit4920395139aaf33a8a4198c1e770357c9b76e660
treef300fb9a8dcd6c034735ab1b5e8d6d7768656c2f
parent706acfe983758bf7c0284bb1a1d23ebcf1c3dc62
fs: fat: cannot write to subdirectories

fs_fat_write() is not able to write to subdirectories.

Currently if a filepath with a leading slash is passed, the slash is
treated as part of the filename to be created in the root directory.

Strip leading (back-)slashes.

Check that the remaining filename does not contain any illegal characters
(<>:"/\|?*). This way we will throw an error when trying to write to a
subdirectory.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
fs/fat/fat_write.c