Skip to content

Commit

Permalink
Trivial: Simplify ensureDirectory
Browse files Browse the repository at this point in the history
mkdirRecurse will not do anything if the directory already exists,
so there is no need to call existsDirectory.
  • Loading branch information
Geod24 committed Mar 10, 2024
1 parent 30d39f8 commit eff2c88
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions source/dub/internal/vibecompat/core/file.d
Original file line number Diff line number Diff line change
Expand Up @@ -252,8 +252,7 @@ FileInfo getFileInfo(string path)
*/
void ensureDirectory(NativePath path)
{
if (!existsDirectory(path))
mkdirRecurse(path.toNativeString());
mkdirRecurse(path.toNativeString());
}

/**
Expand Down

0 comments on commit eff2c88

Please sign in to comment.