fix: Support any extension for shell names across platforms

This commit is contained in:
LukeParkerDev 2026-04-02 12:24:43 +10:00
parent 9425e6d3c2
commit 13025084ec

View file

@ -147,8 +147,9 @@ export const SettingsGeneral: Component = () => {
const getShortName = (p: string) => {
const parts = p.split(/[/\\]/)
let name = parts[parts.length - 1]
if (name.toLowerCase().endsWith(".exe")) {
name = name.slice(0, -4)
const dotIndex = name.lastIndexOf(".")
if (dotIndex > 0) {
name = name.slice(0, dotIndex)
}
return name
}