Skip to content

Commit

Permalink
Merge pull request #180 from 3likayed/BUG-179
Browse files Browse the repository at this point in the history
Fix MaxMind MMDB extraction root and directory
  • Loading branch information
stevebauman authored Jun 28, 2024
2 parents f565e2b + d74e583 commit 8bb24e7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Drivers/MaxMind.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class MaxMind extends Driver implements Updatable
public function update(Command $command): void
{
@mkdir(
$root = Str::beforeLast($this->getDatabasePath(), DIRECTORY_SEPARATOR)
$root = Str::of($this->getDatabasePath())->dirname()
);

$storage = Storage::build([
Expand All @@ -46,7 +46,7 @@ public function update(Command $command): void

$file = $this->discoverDatabaseFile($archive);

$directory = Str::afterLast($file->getPath(), DIRECTORY_SEPARATOR);
$directory = Str::of($file->getPath())->basename();

$relativePath = implode('/', [$directory, $file->getFilename()]);

Expand Down

0 comments on commit 8bb24e7

Please sign in to comment.