mirror of
https://github.com/SpartanJ/eepp.git
synced 2026-09-22 13:01:05 +03:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user