Skip to content

Commit

Permalink
Fix local path
Browse files Browse the repository at this point in the history
  • Loading branch information
timkelty committed Feb 13, 2024
1 parent f3c09b2 commit 6350f50
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/fs/Fs.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,16 @@ protected function defineRules(): array

protected function getLocalFs(): Local
{
$path = $this->localFsPath ? Craft::getAlias($this->localFsPath) : '';

if (!$path) {
throw new InvalidConfigException('Local filesystem path is not set.');
}

$this->localFs = $this->localFs ?? Craft::createObject([
'class' => Local::class,
'hasUrls' => $this->hasUrls,
'path' => $this->localFsPath,
'path' => HierarchicalPath::fromAbsolute($path, $this->prefixPath())->withoutTrailingSlash()->toString(),
'url' => $this->localFsUrl,
]);

Expand Down

0 comments on commit 6350f50

Please sign in to comment.