Bug report for wxFileName

Vadim Zeitlin vadim at wxwindows.org
Sun Dec 17 06:51:29 PST 2006


On Wed, 29 Mar 2006 12:55:44 +0200 Peter Gordon <peter at pg-consultants.com> wrote:

[better late than never]

PG> In the following code, I give various filenames to wxFileName. The
PG> results are consistent except when the leading path is given by \\\\aaa.
PG> In this case, the aaa is dropped from the result. I suspect that the
PG> software thinks it is dealing with the name of remote host. But this is
PG> clearly not the case, because the filename is prefixed by c:
PG> 
PG> 
PG> wxString s = _T("c:\\\\aaa//bbb//ccc") ;
PG> wxFileName fname(s,wxPATH_WIN) ; 
PG> wxPrintf("%s\n",fname.GetFullPath(wxPATH_WIN).mb_str()) ; 
PG> 
PG> c:\bbb\ccc

 I've finally tested this and it, indeed, still misbehaves even in 2.8.0.
It should be fixed in the latest cvs, but there are still some issues left
with multiple consecutive [back]slashes in the paths, in particular I'm not
sure if GetPath() for the string above should return "\\aaa\bbb" or
"\aaa\bbb", currently it does the former.

 So my advice would still be to squeeze multiple consecutive [back]slashes
before passing the string to wxFileName.

 Regards,
VZ

-- 
TT-Solutions: wxWidgets consultancy and technical support
               http://www.tt-solutions.com/





More information about the wx-users mailing list