Skip to content

Commit dfdcdae

Browse files
authored
Merge pull request #28 from InteractionDesignFoundation/fix-failure-when-directory-exists
Fix failure when directory exists
2 parents 75aed1a + f951443 commit dfdcdae

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Services/MaxMindDatabase.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,9 @@ public function boot()
2727

2828
// Copy test database for now
2929
if (is_file($path) === false) {
30-
if (!mkdir($concurrentDirectory = dirname($path)) && !is_dir($concurrentDirectory)) {
30+
if (!is_dir($concurrentDirectory = dirname($path)) &&
31+
!mkdir($concurrentDirectory) &&
32+
!is_dir($concurrentDirectory)) {
3133
throw new \RuntimeException(sprintf('Directory "%s" was not created', $concurrentDirectory));
3234
}
3335

0 commit comments

Comments
 (0)