From 1ae341b637375432c94aa29cf828c41a47d0322c Mon Sep 17 00:00:00 2001 From: Myk Taylor Date: Wed, 15 Jul 2020 22:02:12 -0700 Subject: [PATCH] Check that we created a dir before we return true --- library/modules/Filesystem.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/modules/Filesystem.cpp b/library/modules/Filesystem.cpp index 373b403c8..87001f6dd 100644 --- a/library/modules/Filesystem.cpp +++ b/library/modules/Filesystem.cpp @@ -94,7 +94,7 @@ static bool mkdir_recursive_impl (std::string path) return false; } } - return Filesystem::mkdir(path) || errno == EEXIST; + return (Filesystem::mkdir(path) || errno == EEXIST) && Filesystem::isdir(path); } bool Filesystem::mkdir_recursive (std::string path)