← Back to team overview

kicad-developers team mailing list archive

PATCH: bug #1585714

 

The attached patch *should* fix bug #1585714.
Although I haven't tested on MSWin, I have checked the
function which was returning the false negative and
confirmed that the implementation of the
wxFileName::GetForbiddenChars() would return the
path separator and cause the false negative described
in the bug report.  I have opted to simply test the
validity of the alias component of the name and to
leave the filesystem to complain about any actual invalid
filenames.

- Cirilo
=== modified file '3d-viewer/3d_cache/3d_filename_resolver.cpp'
--- 3d-viewer/3d_cache/3d_filename_resolver.cpp	2016-04-21 07:19:08 +0000
+++ 3d-viewer/3d_cache/3d_filename_resolver.cpp	2016-05-29 22:14:03 +0000
@@ -975,7 +975,6 @@
         return false;
 
     wxString filename = aFileName;
-    wxString lpath;
     size_t pos0 = aFileName.find( ':' );
 
     // ensure that the file separators suit the current platform
@@ -1014,16 +1013,7 @@
             return false;
 
         hasAlias = true;
-
-        lpath = aFileName.substr( pos0 + 1 );
-    }
-    else
-    {
-        lpath = aFileName;
-    }
-
-    if( wxString::npos != lpath.find_first_of( wxFileName::GetForbiddenChars() ) )
-        return false;
+    }
 
     return true;
 }


Follow ups