mirror of
https://github.com/SpartanJ/eepp.git
synced 2026-10-01 10:40:20 +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:
@@ -81,6 +81,11 @@ class EE_API FileSystem {
|
||||
/** Deletes a file from the file system. */
|
||||
static bool fileRemove( const std::string& filepath );
|
||||
|
||||
/** Recursively deletes a directory and all of its contents.
|
||||
* @return True if the directory was removed or did not exist, false on error.
|
||||
*/
|
||||
static bool dirRemoveAll( const std::string& path );
|
||||
|
||||
/** Moves a file or folder to the destination path
|
||||
* @param fromPath The path of the file or folder to move
|
||||
* @param toPath The folder / directory destination path
|
||||
|
||||
Reference in New Issue
Block a user