From eff2c8880d12b81293cbb5b0680bba14e4fe1805 Mon Sep 17 00:00:00 2001 From: Mathias Lang Date: Fri, 8 Mar 2024 18:38:18 +0100 Subject: [PATCH] Trivial: Simplify ensureDirectory mkdirRecurse will not do anything if the directory already exists, so there is no need to call existsDirectory. --- source/dub/internal/vibecompat/core/file.d | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/source/dub/internal/vibecompat/core/file.d b/source/dub/internal/vibecompat/core/file.d index 75a94cf04..1193ceb39 100644 --- a/source/dub/internal/vibecompat/core/file.d +++ b/source/dub/internal/vibecompat/core/file.d @@ -252,8 +252,7 @@ FileInfo getFileInfo(string path) */ void ensureDirectory(NativePath path) { - if (!existsDirectory(path)) - mkdirRecurse(path.toNativeString()); + mkdirRecurse(path.toNativeString()); } /**