Skip to content

Commit

Permalink
Use full path instead of resolving back to alias
Browse files Browse the repository at this point in the history
  • Loading branch information
timkelty committed Dec 31, 2024
1 parent bfbb6cc commit 2ebec7d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/web/AssetManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,10 @@ protected function hash($path): string
->toString();
}

// @phpstan-ignore-next-line
$alias = Craft::alias($dir);
$pathFromRoot = StringHelper::removeLeft($dir, Craft::getAlias('@root/'));

return FileHelper::sanitizeFilename(
preg_replace('/\/|@/', '-', $alias),
preg_replace('/\/|@/', '-', $pathFromRoot),
['asciiOnly' => true]
);
}
Expand Down

0 comments on commit 2ebec7d

Please sign in to comment.