PANEL_FP_PROPERTIES_3D_MODEL: fix an issue in FILENAME_RESOLVER::ValidateFileName():
Allows ':' if it is a disk separator in filenames on MSW (missing in commit b93188).
This commit is contained in:
parent
9f03a259f9
commit
2f9c6dd5cc
|
@ -1016,12 +1016,16 @@ bool FILENAME_RESOLVER::ValidateFileName( const wxString& aFileName, bool& hasAl
|
|||
|
||||
// Test for forbidden chars in filenames. Should be wxFileName::GetForbiddenChars()
|
||||
// On MSW, the list returned by wxFileName::GetForbiddenChars() contains separators
|
||||
// '\'and '/' used here because lpath is a full path (after last ':').
|
||||
// '\'and '/' used here because lpath can be a full path.
|
||||
// So remove separators
|
||||
wxString lpath_no_sep = lpath;
|
||||
#ifdef __WINDOWS__
|
||||
lpath_no_sep.Replace( "/", " " );
|
||||
lpath_no_sep.Replace( "\\", " " );
|
||||
|
||||
// A disk identifier is allowed, and therefore remove its separator
|
||||
if( lpath_no_sep.Length() > 1 && lpath_no_sep[1] == ':' )
|
||||
lpath_no_sep[1] = ' ';
|
||||
#endif
|
||||
|
||||
if( wxString::npos != lpath_no_sep.find_first_of( wxFileName::GetForbiddenChars() ) )
|
||||
|
|
Loading…
Reference in New Issue