Skip to content

Commit

Permalink
More predictable
Browse files Browse the repository at this point in the history
  • Loading branch information
timkelty committed Dec 14, 2023
1 parent 59ce597 commit bea6e57
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/AssetManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,11 @@ protected function hash($path): string
$dir = is_file($path) ? dirname($path) : $path;

// @phpstan-ignore-next-line
return FileHelper::sanitizeFilename(Craft::alias($dir), [
'asciiOnly' => true,
]);
$alias = Craft::alias($dir);

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

0 comments on commit bea6e57

Please sign in to comment.