+ // we should ignore paths which look like UNC shares because we already
+ // have the volume here and the UNC notation (\\server\path) is only valid
+ // for paths which don't start with a volume, so prevent SetPath() from
+ // recognizing "\\foo\bar" in "c:\\foo\bar" as an UNC path
+ //
+ // note also that this is a rather ugly way to do what we want (passing
+ // some kind of flag telling to ignore UNC paths to SetPath() would be
+ // better) but this is the safest thing to do to avoid breaking backwards
+ // compatibility in 2.8
+ if ( IsUNCPath(path, format) )
+ {
+ // remove one of the 2 leading backslashes to ensure that it's not
+ // recognized as an UNC path by SetPath()
+ wxString pathNonUNC(path, 1, wxString::npos);
+ SetPath(pathNonUNC, format);
+ }
+ else // no UNC complications
+ {
+ SetPath(path, format);
+ }