[Wine] Re: WINE fails in directories with Question Marks in name

bgrupczy wineforum-user at winehq.org
Fri Mar 9 00:20:10 CST 2012


stvs wrote:
> 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.


I had the exact same problem. The only workaround is to get that folder renamed to DOS compatible characters, let comskip run through Wine, and then change the name back again. I had to change the RecordingStarted and RecordingDone scripts to get this to happen. Only good way I could think of getting it done is to store off the Title and Episode into temporary files at the start and go read them back when EyeTV was done. I'm surprised the ETVComskip folks haven't run into this and done a workaround. I actually started doing this down in the MarkCommercials.py file but then decided that it would probably be better to do it as high in the chain of events as possible. BTW, I was also playing around with symbolic links and Wine somehow was getting the original path with the question marks.

Hope this helps some folks out there. With my luck, someone will write back with a much easier solution.:)

RecordingStarted snippet

Code:

		set origRecordingID to recordingID
		set recordingID to recording id (recordingID as integer)
		
		set originalTitle to title of recordingID
		set originalEpisode to episode of recordingID
		set title of recordingID to unique ID of recordingID
		set episode of recordingID to ""
		
		set theFile to (path to temporary items from user domain as string) & origRecordingID & "- Title"
		open for access file theFile with write permission
		write (originalTitle) to file theFile
		close access file theFile
		
		set theFile to (path to temporary items from user domain as string) & origRecordingID & "- Episode"
		open for access file theFile with write permission
		write (originalEpisode) to file theFile
		close access file theFile
		
		set cmd to "(sleep 300 ; /usr/bin/nice -n 2 '/Library/Application Support/ETVComskip/MarkCommercials.app/Contents/MacOS/MarkCommercials' --log " & unique ID of recordingID & ") &> /dev/null &"
		commonScript's write_log(cmd)
		do shell script cmd




RecordingDone snippet

Code:

		set origRecordingID to recordingID
		set recordingID to recording id (recordingID as integer)

		delay 15
		set theFile to (path to temporary items from user domain as string) & origRecordingID & "- Title"
		open for access file theFile
		set originalTitle to read file theFile
		close access file theFile
		set theFile to (the quoted form of POSIX path of theFile)
		set cmd to "rm -rf " & theFile & ""
		do shell script cmd
		
		set theFile to (path to temporary items from user domain as string) & origRecordingID & "- Episode"
		open for access file theFile
		set originalEpisode to ""
		try
			set originalEpisode to read file theFile
		end try
		close access file theFile
		set theFile to (the quoted form of POSIX path of theFile)
		set cmd to "rm -rf " & theFile & ""
		do shell script cmd
		
		set title of recordingID to originalTitle
		commonScript's write_log("title set")
		set episode of recordingID to originalEpisode
		commonScript's write_log("episode set")










More information about the wine-users mailing list