Skip to content

Commit 876fbc8

Browse files
committedFeb 25, 2024·
Prevent failure for existing geoip directories -- second attempt
1 parent 75aed1a commit 876fbc8

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed
 

‎src/Services/MaxMindDatabase.php

+4-2
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

@@ -170,4 +172,4 @@ protected function deleteDirectory(string $directory)
170172

171173
return rmdir($directory);
172174
}
173-
}
175+
}

0 commit comments

Comments
 (0)
Please sign in to comment.