fs::remove_all cannot delete non-directory files
actboy168 opened this issue · comments
Describe the bug
fs::remove_all should allow deletion of a file.
To Reproduce
assert(fs::remove_all("test.txt") == 1)
assert(fs::remove_all("test.txt") == 0)
Expected behavior
But now it will throw an exception.
Additional context
Indeed, thanks for reporting! I will push a fix on master when I'm back home and I scheduled a release for next sunday.
Hi, it still has a small problem. When removing a file that does not exist, fs::remove_all should return 0, but it is now 1.
True, added a test and a fix for that.
Closed with release of v1.0.8