On Linux unlink() might fail with ENAMETOOLONG but std::fs::remove_dir_all doesn't handle that and ignores the error, leaving the directory as it was.
When the path is too long a parent directory should be open()ed instead and unlinkat() should be called with the relative path.
On Linux
unlink()might fail withENAMETOOLONGbutstd::fs::remove_dir_alldoesn't handle that and ignores the error, leaving the directory as it was.When the path is too long a parent directory should be
open()ed instead andunlinkat()should be called with the relative path.