[MPlayer-cvslog] r34211 - trunk/gui/win32/interface.c

Reimar Döffinger Reimar.Doeffinger at gmx.de
Tue Oct 18 17:56:37 CEST 2011


On Mon, Oct 17, 2011 at 12:48:20PM +0200, ib wrote:
> Author: ib
> Date: Mon Oct 17 12:48:20 2011
> New Revision: 34211
> 
> Log:
> Cosmetic: Change comment.
> 
> Try to explain why a filename conversion makes sense in the Wine port.
> 
> Modified:
>    trunk/gui/win32/interface.c
> 
> Modified: trunk/gui/win32/interface.c
> ==============================================================================
> --- trunk/gui/win32/interface.c	Mon Oct 17 12:47:28 2011	(r34210)
> +++ trunk/gui/win32/interface.c	Mon Oct 17 12:48:20 2011	(r34211)
> @@ -380,7 +380,9 @@ void uiSetFileName(char *dir, char *name
>  
>      filename = guiInfo.Filename;
>  #ifdef __WINE__
> -    filename = unix_name(filename);    // passed file arguments may be in Windows format
> +    // if filename is in Windows format, convert it
> +    // so that MPlayer will find it in the Linux filesystem
> +    filename = unix_name(filename);

If someone thinks "why would we need that, users can just use proper
linux paths?" they will still be tempted to remove that code after
reading this comment.
As far as I can tell by what you said, the GUI file selection will
break completely without workaround possible without this.
If so this absolutely needs to be documented somewhere, this is
non-obvious and critical to understanding the purpose of this code!
(It also raises the question whether it wouldn't be simpler and
more reliable to have this in the GUI code, after all you could have
a file named "c:\test.avi" in Linux. A secondary question is why MPlayer
compiled for Wine will not use Wine's implementation of open() which
would handle this correctly).


More information about the MPlayer-cvslog mailing list