Skip to content

Commit

Permalink
Fix icon name resolution algorithm
Browse files Browse the repository at this point in the history
  • Loading branch information
Voltra committed May 21, 2024
1 parent d1e562b commit 3dd1e80
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Forms/IconPicker.php
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ private function getIconName(SplFileInfo $file, string $parentPath, string $pref
// - replace every directory separator by a dot
// - add the prefix at the beginning, followed by a dash

$iconName = str($file->getFilenameWithoutExtension())
$iconName = str($file->getPathname())
->after($parentPath . DIRECTORY_SEPARATOR)
->replace(DIRECTORY_SEPARATOR, '.')
->basename('.svg')
Expand Down

0 comments on commit 3dd1e80

Please sign in to comment.