Skip to content

Commit bec2d60

Browse files
committed
Remove file existence check before getting data
1 parent cc87ff9 commit bec2d60

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

packages/framework/src/Support/Filesystem/MediaFile.php

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,9 @@ public function __construct(string $path)
4242

4343
parent::__construct($path);
4444

45-
if (Filesystem::isFile($this->getPath())) {
46-
$this->length = $this->findContentLength();
47-
$this->mimeType = $this->findMimeType();
48-
$this->hash = $this->findHash();
49-
}
45+
$this->length = $this->findContentLength();
46+
$this->mimeType = $this->findMimeType();
47+
$this->hash = $this->findHash();
5048
}
5149

5250
/** @return \Illuminate\Support\Collection<string, \Hyde\Support\Filesystem\MediaFile> The array keys are the filenames relative to the _media/ directory */

0 commit comments

Comments
 (0)