Skip to content

Commit

Permalink
Fix GridFS implementation.
Browse files Browse the repository at this point in the history
  • Loading branch information
frankdejonge committed Sep 27, 2024
1 parent 0c6b737 commit 11d6f6a
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 11d6f6a

Please sign in to comment.