Is there a way to tell WINE that question marks in directory names are okay? WINE fails whenever I ask it to access a file from within a directory with a question mark in its name. Specifically, my HTPC marks all commercials using WINE and Comskip. Whenever the schedule includes a tv show with a question mark in its title, WINE fails. Here are the logs that illustrate the failure. Script log that calls WINE: Code: Sun Sep 4 23:00:24 2011 - Changing directory to /Volumes/Macintosh HD2/Documents/EyeTV Archive/Curiosity_ Is There a Parallel Universe?.eyetvsched Sun Sep 4 23:00:24 2011 - Running: /usr/bin/nice -n 14 "/opt/local/bin/wine" "/Library/Application Support/ETVComskip/comskip/comskip.exe" --ini="/Library/Application Support/ETVComskip/comskip/comskip.ini" "00000000141472b8.mpg" > /Users/name/Library/Logs/ETVComskip/336884408_comskip.log 2>&1 Sun Sep 4 23:02:11 2011 - Return code is: 768, 0x300 Sun Sep 4 23:02:11 2011 - Error code is: 3, 0x3 WINE's output log: Code: Warning: could not find DOS drive for current working directory '/Volumes/Macintosh HD2/Documents/EyeTV Archive/Curiosity_ Is There a Parallel Universe?.eyetvsched', starting in the Windows directory. The commandline used was: "Z:\Library\Application Support\ETVComskip\comskip\comskip.exe" "--ini=/Library/Application Support/ETVComskip/comskip/comskip.ini" 00000000141472b8.mpg Opening 00000000141472b8.mpg Comskip 0.80.042, made using: mpeg2dec-0.4.0 - by Michel Lespinasse <walken at zoy.org> and Aaron Holtzman No such file or directory - could not open file 00000000141472b8.mpg
Martin Gregorie
2011-Sep-12 21:22 UTC
[Wine] WINE fails in directories with Question Marks in name
On Mon, 2011-09-12 at 14:32 -0500, stvs wrote:> Is there a way to tell WINE that question marks in directory names are > okay? >More specifically, you can easily create a file containing a question mark, e.g. "doc?.txt", and you can then create a file called "doca.txt". No problem. However, if you try to reference an existing file and there is more than one file whose names are identical except where the question mark occurs the open will fail because the string you gave it matches more than one file and so the shell doesn't know which file to select. You can escape a character to remove its special properties or enclose the string containing it in single quotes. The common characters that this applies to are: ? - the shell treats this as a single character wild card * - treated as a wild card matching zero or more characters space - the shell uses space as an argument delimiter. Actually, it treats whitespace (space, tab and newline) as argument delimiters. Similar rules apply to using semicolons, single and double quotes and ampersands in file names. Martin> Code: > Sun Sep 4 23:00:24 2011 - Changing directory to /Volumes/Macintosh HD2/Documents/EyeTV Archive/Curiosity_ Is There a Parallel Universe?.eyetvsched > Sun Sep 4 23:00:24 2011 - Running: /usr/bin/nice -n 14 "/opt/local/bin/wine" "/Library/Application Support/ETVComskip/comskip/comskip.exe" --ini="/Library/Application Support/ETVComskip/comskip/comskip.ini" "00000000141472b8.mpg" > /Users/name/Library/Logs/ETVComskip/336884408_comskip.log 2>&1 > Sun Sep 4 23:02:11 2011 - Return code is: 768, 0x300 > Sun Sep 4 23:02:11 2011 - Error code is: 3, 0x3 > > > > > WINE's output log: > > > Code: > Warning: could not find DOS drive for current working directory '/Volumes/Macintosh HD2/Documents/EyeTV Archive/Curiosity_ Is There a Parallel Universe?.eyetvsched', starting in the Windows directory. > The commandline used was: > "Z:\Library\Application Support\ETVComskip\comskip\comskip.exe" "--ini=/Library/Application Support/ETVComskip/comskip/comskip.ini" 00000000141472b8.mpg > > Opening 00000000141472b8.mpg > Comskip 0.80.042, made using: > mpeg2dec-0.4.0 - by Michel Lespinasse <walken at zoy.org> and Aaron Holtzman > No such file or directory - could not open file 00000000141472b8.mpg > > > > > >
stvs
2011-Sep-12 21:58 UTC
[Wine] Re: WINE fails in directories with Question Marks in name
> You can escape a character to remove its special properties or > enclose the string containing it in single quotes.Great, but how do I do that when I'm in a DIRECTORY that contains a special character? This is how this problem arises: there is a directory called 'foo?' in which there is the file bar.mpg. This fails: $ cd 'foo?' $ wine cmd.exe bar.mpg WINE is unable to operate within the directory named 'foo?'. There is no way for me to escape the directory's name in the (scripted) call to wine.
stvs
2011-Sep-12 23:31 UTC
[Wine] Re: WINE fails in directories with Question Marks in name
Thanks for the suggestion, but that wil fail because it is wine that fails when executed from within a directory containing a special character. Of course you can escape the character in a shell script, but that won't help wine when it attempts to access the directory './foo?'. E.g., see the comskip logs above.
stvs
2011-Sep-13 11:17 UTC
[Wine] Re: WINE fails in directories with Question Marks in name
Fr??d??ric, Thanks for your answer. As a wine design question, is it reasonable for wine to have a flag that allows it to escape certain special characters and handle a greater subset of BSD names, except in the obviously clashing cases like backslash '\' and colon ':'?
vitamin
2011-Sep-13 13:35 UTC
[Wine] Re: WINE fails in directories with Question Marks in name
stvs wrote:> As a wine design question, is it reasonable for wine to have a flag that allows it to escape certain special characters and handle a greater subset of BSD names, except in the obviously clashing cases like backslash '\' and colon ':'?No, it's not reasonable. Wine implements win32 api, which has specific requirements for file names. BTW Wine does allow colon ":" in file names, which on Windows represents a NTFS file stream.
vitamin
2011-Sep-13 13:59 UTC
[Wine] Re: WINE fails in directories with Question Marks in name
Fr??d??ric Delanoy wrote:> Actually it's a bit more complicated than that.It always is, on Windows. On Wine, it's just that - Wine allows colon in filenames. I haven't dug deep into this in Wine code, but AJ few days ago said just that "It's kind of supported, by simply not doing anything special and creating separate files."