genodelabs / genode

Genode OS Framework
https://genode.org/
Other
1.05k stars 249 forks source link

vfs_fatfs: rm -r dir/ (trailing slash) fails #5329

Open rite opened 3 weeks ago

rite commented 3 weeks ago

The issue can be reproduced by executing run/bash with commit 6e4a5ce and issuing the following bash command:

bash-4.4# mkdir -p fatfs/test; echo "world" > fatfs/test/hello; rm -r fatfs/test/
(null): cannot remove 'fatfs/test/': Operation not permitted

It works without trailing slash:

bash-4.4# mkdir -p fatfs/test; echo "world" > fatfs/test/hello; rm -r fatfs/test

...and it also works with or without trailing slash using the ramfs:

bash-4.4# mkdir -p tmp/test; echo "world" > tmp/test/hello; rm -r tmp/test
bash-4.4# mkdir -p tmp/test; echo "world" > tmp/test/hello; rm -r tmp/test
rite commented 3 weeks ago

This issue reminds me of #2686, but it seems to be specific to the fatfs VFS-plugin.