Always add a \ to temp file path

Steven Edwards steven_ed4153 at yahoo.com
Tue Dec 16 14:52:47 CST 2003


There is a prepackaged binary that works great for me on slackware if
you want it. Builing one from scratch is to much of a pain in the ass.

http://www.libsdl.org/extras/win32/cross/README.txt

Thanks
Steven

--- Mike Hearn <mike at theoretic.com> wrote:
> The NullSoft installer assumes this will be present, so it most
> likely
> always is on Windows. When I get a cross compiler setup (soon,
> promise!)
> I'll try writing a test case for this behaviour.
> 
> Mike Hearn <mike at theoretic.com>
> Always add a \ to temp file path. Add a warning to DeleteFile.
> 
> Index: files/file.c
> ===================================================================
> RCS file: /home/wine/wine/files/file.c,v
> retrieving revision 1.196
> diff -u -r1.196 file.c
> --- files/file.c        12 Dec 2003 04:10:52 -0000      1.196
> +++ files/file.c        16 Dec 2003 19:47:04 -0000
> @@ -921,10 +921,8 @@
>      strcpyW( buffer, path );
>      p = buffer + strlenW(buffer);
>   
> -    /* add a \, if there isn't one and path is more than just the
> drive letter ... */
> -    if ( !((strlenW(buffer) == 2) && (buffer[1] == ':'))
> -       && ((p == buffer) || (p[-1] != '\\'))) *p++ = '\\';
> -
> +    *p++ = '\\';
> +
>      for (i = 3; (i > 0) && (*prefix); i--) *p++ = *prefix++;
>   
>      unique &= 0xffff;
> @@ -1556,7 +1554,11 @@
>          return FALSE;
>      }
>   
> -    if (!DOSFS_GetFullName( path, TRUE, &full_name )) return FALSE;
> +    if (!DOSFS_GetFullName( path, TRUE, &full_name ))
> +    {
> +       WARN("Unable to get full name from %s\n", debugstr_w(path));
> +       return FALSE;
> +    }
>   
>      /* check if we are allowed to delete the source */
>      hFile = FILE_CreateFile( full_name.long_name,
> GENERIC_READ|GENERIC_WRITE, 0,
> 
> 
> 


__________________________________
Do you Yahoo!?
New Yahoo! Photos - easier uploading and sharing.
http://photos.yahoo.com/



More information about the wine-patches mailing list