From 2b9f076024f9066c4de2b5fe0ea59b2dec698d49 Mon Sep 17 00:00:00 2001 From: Elad <18193363+elad335@users.noreply.github.com> Date: Wed, 27 Nov 2024 21:38:30 +0200 Subject: [PATCH] fs: Minor fix of fs::dir::open Did not close previous handle on fs::dir::open like on fs::file --- Utilities/File.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Utilities/File.cpp b/Utilities/File.cpp index 43eba93eaa..3c4a8c769d 100644 --- a/Utilities/File.cpp +++ b/Utilities/File.cpp @@ -1789,6 +1789,8 @@ fs::file_id fs::file::get_id() const bool fs::dir::open(const std::string& path) { + m_dir.reset(); + if (path.empty()) { // Don't allow opening empty path (TODO)