Fix recursive directory removal across platforms

Add FileSystem::dirRemoveAll() to normalize trailing separators and use the non-throwing std::filesystem::remove_all overload.

Migrate ecode and unit-test cleanup call sites to the centralized helper, preventing Haiku from crashing when removing directories with trailing slashes during shutdown.
This commit is contained in:
Martín Lucas Golini
2026-08-18 13:37:56 -03:00
parent 1b2927e129
commit 01ebd7a82d
8 changed files with 43 additions and 43 deletions

View File

@@ -55,10 +55,7 @@ class ScopedTestDirectory {
public:
explicit ScopedTestDirectory( std::filesystem::path path ) : mPath( std::move( path ) ) {}
~ScopedTestDirectory() {
std::error_code error;
std::filesystem::remove_all( mPath, error );
}
~ScopedTestDirectory() { FileSystem::dirRemoveAll( mPath.string() ); }
private:
std::filesystem::path mPath;