Skip to content

Commit

Permalink
Merge pull request #28 from InteractionDesignFoundation/fix-failure-w…
Browse files Browse the repository at this point in the history
…hen-directory-exists

Fix failure when directory exists
  • Loading branch information
alies-dev authored Feb 26, 2024
2 parents 75aed1a + f951443 commit dfdcdae
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Services/MaxMindDatabase.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ public function boot()

// Copy test database for now
if (is_file($path) === false) {
if (!mkdir($concurrentDirectory = dirname($path)) && !is_dir($concurrentDirectory)) {
if (!is_dir($concurrentDirectory = dirname($path)) &&
!mkdir($concurrentDirectory) &&
!is_dir($concurrentDirectory)) {
throw new \RuntimeException(sprintf('Directory "%s" was not created', $concurrentDirectory));
}

Expand Down

0 comments on commit dfdcdae

Please sign in to comment.