x11drv: XDND: Fix file drop to properly support file:/// URIs (debugging problem)

2007-03-22 Thread Maciej Katafiasz
Hi, I'm working on a bug in winex11drv/xdnd.c, where file:/// URIs are not correctly interpreted, resulting in DnD broken most of the time. There are two parts of that bug: 1) X11DRV_XDND_BuildDropFiles() fails to properly handle absolute unix paths, which is exactly what you get from file:///, s

Re: x11drv: XDND: Fix file drop to properly support file:/// URIs(debugging problem)

2007-03-22 Thread Felix Nawothnig
Maciej Katafiasz wrote: +if(GetLastError()) +{ + TRACE("Can't convert to WCHAR: %d\n", GetLastError()); + goto clean_wfn; +} This is not an appropriate way of testing for an API failure. What is inappropriate and how should I fix it? Most APIs don't change GLE on success

Re: x11drv: XDND: Fix file drop to properly support file:/// URIs(debugging problem)

2007-03-22 Thread Maciej Katafiasz
On tor, 2007-03-22 at 12:02 +0800, Dmitry Timoshkov wrote: > Please use the same indentation style as the existing does, i.e. 4 spaces, > not 2. Yep, I didn't fix that in that patch, I just forgot to set the indent style properly, and it's not a patch ready for submission anyway. But noted. > > +

Re: x11drv: XDND: Fix file drop to properly support file:/// URIs(debugging problem)

2007-03-21 Thread Robert Shearman
Dmitry Timoshkov wrote: -strcpy(((char*)lpDrop)+lpDrop->pFiles, path); +memcpy(((char*)lpDrop)+lpDrop->pFiles, (char*)wpath, fullpathlen * sizeof(WCHAR)); Use lstrcpyW here instead of memcpy. Why? Maciej has already got the length, so why not do the appropriate calculation

Re: x11drv: XDND: Fix file drop to properly support file:/// URIs(debugging problem)

2007-03-21 Thread Dmitry Timoshkov
Maciej Katafiasz <[EMAIL PROTECTED]> wrote: + if(!strncasecmp(p, "://localhost/", 13)) + { + i = 12; + } else if (!strncasecmp(p, ":///", 4)) + { + i = 3; + } else + { + TRACE("Not a valid file: URI: %s\n", (char*)data); + return count; + } P

x11drv: XDND: Fix file drop to properly support file:/// URIs (debugging problem)

2007-03-21 Thread Maciej Katafiasz
Hi, (please ignore the other copy I sent from the wrong address by accident) I'm working on a bug in winex11drv/xdnd.c, where file:/// URIs are not correctly interpreted, resulting in DnD broken most of the time. There are two parts of that bug: 1) X11DRV_XDND_BuildDropFiles() fails to properly