http://bugs.winehq.org/show_bug.cgi?id=20720
Summary: winebrowser fails when # is in the file name Product: Wine Version: 1.1.33 Platform: Macintosh OS/Version: Mac OS X 10.5 Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown AssignedTo: wine-bugs@winehq.org ReportedBy: domiman@gmail.com
I'm using winebrowser to open various files on my host system. When the file name of a file I try to open contains # winebrowser can't find the file for some reason.
my registry entries:
REGEDIT4
[HKEY_CLASSES_ROOT.ini] @="WINE_BROWSER.file"
[HKEY_CLASSES_ROOT\WINE_BROWSER.file]
[HKEY_CLASSES_ROOT\WINE_BROWSER.file\shell]
[HKEY_CLASSES_ROOT\WINE_BROWSER.file\shell\open]
[HKEY_CLASSES_ROOT\WINE_BROWSER.file\shell\open\command] @="c:\windows\system32\winebrowser.exe -nohome "%1""
and the error when I try to open ~/.wine/drive_c/windows/test#.ini:
The file /Users/dominus/.wine/drive_c/windows/C:\windows\test#.ini does not exist. (no other text in the console about this)
When I rename test#.ini to test.ini it opens fine with the associated app on my system.
My system Mac OS X 10.6.2, bug observed in both Wine 1.1.32 and 1.1.33
http://bugs.winehq.org/show_bug.cgi?id=20720
Vitaliy Margolen vitaliy@kievinfo.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution| |INVALID
--- Comment #1 from Vitaliy Margolen vitaliy@kievinfo.com 2009-11-15 14:25:30 ---
@="c:\windows\system32\winebrowser.exe -nohome "%1""
There is a reason Wine's default entry doesn't look like this.
http://bugs.winehq.org/show_bug.cgi?id=20720
Vitaliy Margolen vitaliy@kievinfo.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #2 from Vitaliy Margolen vitaliy@kievinfo.com 2009-11-15 14:26:06 --- Invalid - user caused configuration error
http://bugs.winehq.org/show_bug.cgi?id=20720
--- Comment #3 from domiman@gmail.com 2009-11-15 14:51:50 --- What is the correct entry?
When I follow the instructions at http://wiki.winehq.org/FAQ#head-e03d797155ac6e9d8176f045acbdeebc28ad33d4 and use this to associate pdf files with winebrowser
[HKEY_CLASSES_ROOT.pdf] @="PDFfile" "Content Type"="application/pdf" [HKEY_CLASSES_ROOT\PDFfile\Shell\Open\command] @="winebrowser "%1""
pdf files with # in the filename still do not get launched.
http://bugs.winehq.org/show_bug.cgi?id=20720
--- Comment #4 from domiman@gmail.com 2009-11-15 15:15:00 --- Interestingly when # is the first character of the filename, the file gets launched.
http://bugs.winehq.org/show_bug.cgi?id=20720
Vitaliy Margolen vitaliy@kievinfo.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|CLOSED |UNCONFIRMED Resolution|INVALID |
--- Comment #5 from Vitaliy Margolen vitaliy@kievinfo.com 2009-11-15 15:26:50 --- Oh sorry, you are adding a new one. What does the +winebrowser log say?
http://bugs.winehq.org/show_bug.cgi?id=20720
--- Comment #6 from domiman@gmail.com 2009-11-15 15:35:43 --- c:\test.pdf:
trace:winebrowser:launch_app Considering: "/usr/bin/open" trace:winebrowser:launch_app argv[1]: "file:///Users/dominus/.wine/dosdevices/c:/test.pdf"
c:\test#.pdf:
trace:winebrowser:launch_app Considering: "/usr/bin/open" trace:winebrowser:launch_app argv[1]: "C:\test#.pdf" The file /Users/dominus/.wine/drive_c/C:\test#.pdf does not exist.
I'm launching with export WINEDEBUG=+winebrowser Anything else I can do to test?
http://bugs.winehq.org/show_bug.cgi?id=20720
--- Comment #7 from Hans Leidekker hans@meelstraat.net 2009-11-16 04:23:57 --- Created an attachment (id=24781) --> (http://bugs.winehq.org/attachment.cgi?id=24781) winebrowser: Handle filename with number sign or question mark.
Try this patch.
http://bugs.winehq.org/show_bug.cgi?id=20720
--- Comment #8 from domiman@gmail.com 2009-11-16 10:45:08 --- This works so far on my system. Thanks a lot for this very fast fix
http://bugs.winehq.org/show_bug.cgi?id=20720
--- Comment #9 from domiman@gmail.com 2009-11-16 18:09:24 --- One thing I noticed when I tried some special characters, that *might* be in file names (german umlaute, ß, €, @). All these work fine, except for €.
With the file named test€.pdf I get:
trace:winebrowser:launch_app Considering: "/usr/bin/open" trace:winebrowser:launch_app argv[1]: "file:///Users/dominus/.wine/dosdevices/c:/test%AC.pdf" The URL file:///Users/dominus/.wine/dosdevices/c:/test%AC.pdf does not refer to a file.
Another one is test¿.pdf trace:winebrowser:launch_app Considering: "/usr/bin/open" trace:winebrowser:launch_app argv[1]: "file:///Users/dominus/.wine/dosdevices/c:/test%BF.pdf" The URL file:///Users/dominus/.wine/dosdevices/c:/test%BF.pdf does not refer to a file.
I don't know if these are relevant, € *could* be in a file name on OS X, I don't know if the Windows specs allow such a name. I don't know about ¿ (I only tried that because at times I run into it when I try to enter \ which is at ctrl+alt+ß on my german keyboard).
http://bugs.winehq.org/show_bug.cgi?id=20720
--- Comment #10 from domiman@gmail.com 2009-11-28 11:33:43 --- Another one that fails is % preceeded or followed by space. te% st.pdf fails with The file /Users/dominus/.wine/dosdevices/c:/te%%20st.pdf does not exist.
te %st.pdf fails with The file /Users/dominus/.wine/dosdevices/c:/te%20%st.pdf does not exist.
Just for your information.
http://bugs.winehq.org/show_bug.cgi?id=20720
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Platform|Macintosh |PC
http://bugs.winehq.org/show_bug.cgi?id=20720
André H. nerv@dawncrow.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |nerv@dawncrow.de
--- Comment #11 from André H. nerv@dawncrow.de 2009-12-27 16:57:04 --- cannot confirm this in git
http://bugs.winehq.org/show_bug.cgi?id=20720
--- Comment #12 from domiman@gmail.com 2010-01-08 12:32:01 --- I can't speak for GIT but with 1.1.35 this problem is unchanged for me on OS X.
http://bugs.winehq.org/show_bug.cgi?id=20720
--- Comment #13 from André H. nerv@dawncrow.de 2010-07-08 14:55:07 --- Still can confirm in linux, maybe its truely a bug only on mac
http://bugs.winehq.org/show_bug.cgi?id=20720
--- Comment #14 from André H. nerv@dawncrow.de 2010-07-08 14:55:25 --- -can +can't
http://bugs.winehq.org/show_bug.cgi?id=20720
--- Comment #15 from domiman@gmail.com 2010-07-08 15:16:02 --- Most likely it is, it is still happening for me with the latest RC :(
http://bugs.winehq.org/show_bug.cgi?id=20720
Jörg Höhle hoehle@users.sourceforge.net changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |hoehle@users.sourceforge.ne | |t
--- Comment #16 from Jörg Höhle hoehle@users.sourceforge.net 2010-10-07 12:24:52 CDT --- There are 2 issues.
A) C:... is sometimes passed to the external program, sometimes not trace:winebrowser:launch_app argv[1]: "C:\test#.pdf" trace:winebrowser:launch_app argv[1]: "C:\test#2.pdf" trace:winebrowser:launch_app argv[1]: "file:///Users/admin/.wine/dosdevices/c:/test.pdf" trace:winebrowser:launch_app argv[1]: "file:///Users/admin/.wine/dosdevices/c:/#test.pdf" The later shows that a non-escaped URL is passed to the external program.
B) Appropriate escaping is needed with /usr/bin/open - file:///Users/... -- URLs need % escapes - /Users/... wants the literal name.
$ open "/Users/admin/.wine/dosdevices/c:/%74est.pdf" The file /Users/admin/.wine/dosdevices/c:/%74est.pdf does not exist. $ open "file:///Users/admin/.wine/dosdevices/c:/%74est.pdf" works. %4 translates to t, %23 to #. $ open "file:///Users/admin/.wine/dosdevices/c:/test%23.pdf" works. $ open "file:////Users/admin/.wine/dosdevices/c:/test#.pdf" The file //Users/admin/.wine/dosdevices/c:/test does not exist. open rightfully complains about "test", not "test#.pdf". The section after # is cut-off, which is understandable, because the # separates URI from fragment identifier, see RFC2396 or 1738. Every browser implements this since 1992. /usr/bin/open "file:///path.../#..." will see a directory URL and open a file browser, no surprise.
test¿.pdf and test€.pdf work for me in MacOSX 10.5.8 with Wine-1.3.4 trace:winebrowser:launch_app argv[1]: "file:///Users/admin/.wine/dosdevices/c:/test\xc2\xbf.pdf" trace:winebrowser:launch_app argv[1]: "file:///Users/admin/.wine/dosdevices/c:/test\xe2\x82\xac.pdf"
test% .pdf and test %.pdf also work, even though the URL constructed is incorrect: trace:winebrowser:launch_app argv[1]: "file:///Users/admin/.wine/dosdevices/c:/test% .pdf" trace:winebrowser:launch_app argv[1]: "file:///Users/admin/.wine/dosdevices/c:/test %.pdf"
The component at fault is programs - winebrowser/main.c:/wmain
http://bugs.winehq.org/show_bug.cgi?id=20720
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- OS/Version|Mac OS X 10.5 |Mac OS X
http://bugs.winehq.org/show_bug.cgi?id=20720
Jörg Höhle hoehle@users.sourceforge.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Component|-unknown |programs
https://bugs.winehq.org/show_bug.cgi?id=20720
--- Comment #17 from Austin English austinenglish@gmail.com --- This is your friendly reminder that there has been no bug activity for 2 years. Is this still an issue in current (1.7.28 or newer) wine? If so, please attach the terminal output in 1.7.28 (see http://wiki.winehq.org/FAQ#get_log).
https://bugs.winehq.org/show_bug.cgi?id=20720
André H. nerv@dawncrow.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC|nerv@dawncrow.de |
https://bugs.winehq.org/show_bug.cgi?id=20720
domiman@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution|--- |WORKSFORME
--- Comment #18 from domiman@gmail.com --- Thanks for the reminder. The latest version of Wine I have installed is 1.7.25 and indeed the bug no longer shows itself. # € and & (with preceding or following gap) work correctly in filenames now.
Crossover 13.2 still has problems with those but 1. it doesn't matter here and 2. I know crossover is always a lot of versions behind.
So I'm tagging this as resolved, works for me. Thanks to whoever fixed it :)
https://bugs.winehq.org/show_bug.cgi?id=20720
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Resolution|WORKSFORME |FIXED
--- Comment #19 from Austin English austinenglish@gmail.com --- Fixed then.
https://bugs.winehq.org/show_bug.cgi?id=20720
Jacek Caban jacek@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |1de7771a7ce2a20abd1eff32073 | |420c6d8786fb7 CC| |jacek@codeweavers.com
https://bugs.winehq.org/show_bug.cgi?id=20720
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #20 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 1.7.29.