From dd6568c64e440fe9d8c75539165377ddbbca3e2c Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Sat, 27 Apr 2024 22:10:15 +0200 Subject: MHR-18: A lot of patches and fixes, big improvements as well. Signed-off-by: Amlal El Mahrouss --- Private/Source/NewFS+FileManager.cxx | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'Private/Source/NewFS+FileManager.cxx') diff --git a/Private/Source/NewFS+FileManager.cxx b/Private/Source/NewFS+FileManager.cxx index 7227c2e2..910ec841 100644 --- a/Private/Source/NewFS+FileManager.cxx +++ b/Private/Source/NewFS+FileManager.cxx @@ -5,6 +5,7 @@ ------------------------------------------- */ #include +#include #ifdef __FSKIT_NEWFS__ @@ -15,9 +16,14 @@ namespace NewOS { /// @brief C++ constructor NewFilesystemManager::NewFilesystemManager() { MUST_PASS(Detail::fs_init_newfs()); + fImpl = new NewFSParser(); } -NewFilesystemManager::~NewFilesystemManager() = default; +NewFilesystemManager::~NewFilesystemManager() { + if (fImpl) { + delete fImpl; + } +} /// @brief Removes a node from the filesystem. /// @param fileName The filename @@ -53,15 +59,15 @@ NodePtr NewFilesystemManager::CreateAlias(const char* path) { } /// @brief Gets the root directory. -/// @return +/// @return const char* NewFilesystemHelper::Root() { return kNewFSRoot; } /// @brief Gets the up-dir directory. -/// @return +/// @return const char* NewFilesystemHelper::UpDir() { return kNewFSUpDir; } /// @brief Gets the separator character. -/// @return +/// @return const char NewFilesystemHelper::Separator() { return kNewFSSeparator; } } // namespace NewOS -- cgit v1.2.3