Skip to content

Commit

Permalink
[AMAZON]: Fix issues when title is unset (#3746)
Browse files Browse the repository at this point in the history
* fix: suggest a prefix directory based on appname when not possible from title

* tech: update nile to 1.0.3

* fix: suggestedWinePrefix typo
  • Loading branch information
imLinguin authored May 11, 2024
1 parent 5d429a1 commit ac0a8ef
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 5 deletions.
Binary file modified public/bin/darwin/nile
Binary file not shown.
Binary file modified public/bin/linux/nile
Binary file not shown.
Binary file modified public/bin/win32/nile.exe
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ type Props = {
wineVersionList: WineInstallation[]
wineVersion: WineInstallation | undefined
title?: string
appName: string
}

export default function WineSelector({
Expand All @@ -32,7 +33,8 @@ export default function WineSelector({
wineVersion,
title = 'sideload',
crossoverBottle,
setCrossoverBottle
setCrossoverBottle,
appName
}: Props) {
const { t, i18n } = useTranslation('gamepage')

Expand Down Expand Up @@ -62,10 +64,10 @@ export default function WineSelector({
setWineVersion(wineVersion)
setCrossoverBottle(defaultBottle)
} else {
const sugestedWinePrefix = `${prefixFolder}/${removeSpecialcharacters(
title
)}`
setWinePrefix(sugestedWinePrefix)
const dirName =
removeSpecialcharacters(title) || removeSpecialcharacters(appName)
const suggestedWinePrefix = `${prefixFolder}/${dirName}`
setWinePrefix(suggestedWinePrefix)
setWineVersion(wineVersion || undefined)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,7 @@ export default React.memo(function InstallModal({
{platformSelection()}
{hasWine ? (
<WineSelector
appName={appName}
winePrefix={winePrefix}
wineVersion={wineVersion}
wineVersionList={wineVersionList}
Expand All @@ -200,6 +201,7 @@ export default React.memo(function InstallModal({
{platformSelection()}
{hasWine ? (
<WineSelector
appName={appName}
winePrefix={winePrefix}
wineVersion={wineVersion}
wineVersionList={wineVersionList}
Expand Down

0 comments on commit ac0a8ef

Please sign in to comment.