Winetricks / winetricks

Winetricks is an easy way to work around problems in Wine
GNU Lesser General Public License v2.1
2.73k stars 398 forks source link

Winetricks doesn't like apostrophe in folder path #1119

Open AccountOneOff opened 5 years ago

AccountOneOff commented 5 years ago

This an issue I found while using Lutris but it also happens outside of it. My prefix folder path has an apostrophe and winetricks does not like it. https://github.com/lutris/lutris/issues/1258

Made a prefix with an apostrophe to test export WINEPREFIX=/home/cxf/Games/prefix\'test and this is what I get.

cxf@PC:~$ winetricks
------------------------------------------------------
You are using a 64-bit WINEPREFIX. Note that many verbs only install 32-bit versions of packages. If you encounter problems, please retest in a clean 32-bit WINEPREFIX before reporting a bug.
------------------------------------------------------
Using winetricks 20171222-next - sha256sum: 01ebb56d22f54467343700eedfe283d82a47e67bbb6c2d68b7da743f41bb78a3 with wine-3.18 (Staging) and WINEARCH=win64
------------------------------------------------------
You are running winetricks-20171222-next, latest upstream is winetricks-20180815!
------------------------------------------------------
------------------------------------------------------
You should update using your distribution's package manager, --self-update, or manually.
------------------------------------------------------
Gtk-Message: 21:28:27.665: Failed to load module "unity-gtk-module"
Gtk-Message: 21:28:27.666: Failed to load module "unity-gtk-module"
/tmp/winetricks.e6OCkRMw/w.cxf.14277/zenity.sh: 1: /tmp/winetricks.e6OCkRMw/w.cxf.14277/zenity.sh: Syntax error: Unterminated quoted string
Gtk-Message: 21:28:30.547: Failed to load module "unity-gtk-module"
Gtk-Message: 21:28:30.549: Failed to load module "unity-gtk-module"
austin987 commented 5 years ago

Your winetricks is out of date:

austin@laptop:~$ WINEPREFIX="$HOME/my foo's prefix" winetricks -q good
Using winetricks 20180815-next - sha256sum: 19fd684d1dc9e6d581e0354c7b154a6ce3f407a48f8b0ce14b4f3d7857bd974f with wine-3.12-1-g4613153b2d and WINEARCH=win32
Executing w_do_call good
Executing load_good 
------------------------------------------------------
good succeeded!
------------------------------------------------------
AccountOneOff commented 5 years ago

This still happens to me. I'm on Ubuntu 18.10 if that helps.

cxf@PC:~$ export WINEPREFIX=/home/cxf/test\'prefix
cxf@PC:~$ cd Downloads/
cxf@PC:~/Downloads$ chmod +x winetricks
cxf@PC:~/Downloads$ ./winetricks 
------------------------------------------------------
You are using a 64-bit WINEPREFIX. Note that many verbs only install 32-bit versions of packages. If you encounter problems, please retest in a clean 32-bit WINEPREFIX before reporting a bug.
------------------------------------------------------
Using winetricks 20180815-next - sha256sum: 660767f65eef15977ebabda5c8e94e56864d5d8ca7114da30b9b6be35c1b5a5a with wine-3.18 (Staging) and WINEARCH=win64
Gtk-Message: 20:12:22.332: Failed to load module "unity-gtk-module"
Gtk-Message: 20:12:22.333: Failed to load module "unity-gtk-module"
winetricks GUI enabled, using zenity 3.30.0
Gtk-Message: 20:12:22.410: Failed to load module "unity-gtk-module"
Gtk-Message: 20:12:22.411: Failed to load module "unity-gtk-module"
/tmp/winetricks.Dbs8nVQ0/w.cxf.16837/zenity.sh: 1: /tmp/winetricks.Dbs8nVQ0/w.cxf.16837/zenity.sh: Syntax error: Unterminated quoted string
Gtk-Message: 20:12:24.683: Failed to load module "unity-gtk-module"
Gtk-Message: 20:12:24.684: Failed to load module "unity-gtk-module"

WINEPREFIX="/home/cxf/test'prefix" ./winetricks also fails.

AccountOneOff commented 5 years ago

This is a problem with the GUI. Calling good works fine.

cxf@PC:~/.local/share/lutris/runtime/winetricks$ ./winetricks -q good
------------------------------------------------------
You are using a 64-bit WINEPREFIX. Note that many verbs only install 32-bit versions of packages. If you encounter problems, please retest in a clean 32-bit WINEPREFIX before reporting a bug.
------------------------------------------------------
Using winetricks 20180815-next - sha256sum: 70bfdf04ef5c35c923b1c2caab0fdd8fb5f961ab47e7a648b2230573f81bf09d with wine-3.18 (Staging) and WINEARCH=win64
Executing w_do_call good
Executing load_good 
------------------------------------------------------
good succeeded!
------------------------------------------------------
austin987 commented 5 years ago

The issue is somewhere in here: https://github.com/Winetricks/winetricks/blob/master/src/winetricks#L3610

though it's not immediately obvious to me what needs to change.