Skip to content

Commit

Permalink
Fix GridFS implementation.
Browse files Browse the repository at this point in the history
  • Loading branch information
frankdejonge committed Oct 8, 2024
1 parent ea85425 commit b776a64
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/GridFS/GridFSAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -280,17 +280,17 @@ public function lastModified(string $path): FileAttributes

public function metadata(string $path, Config $config): StorageAttributes
{
$file = $this->findFile($path);

if ($file !== null) {
return $this->mapFileAttributes($file);
}

if ($this->directoryExists($path)) {
return new DirectoryAttributes($path);
}

throw UnableToRetrieveMetadata::metadata($path, 'file does not exist');
$file = $this->findFile($path);

if ($file === null) {
throw UnableToRetrieveMetadata::metadata($path, 'file does not exist');
}

return $this->mapFileAttributes($file);
}

public function listContents(string $path, bool $deep): iterable
Expand Down

0 comments on commit b776a64

Please sign in to comment.