Fix FP Editor : Invalid Filename Err.msg message wheb trying to edit a 3D filename

This commit is contained in:
Cirilo Bernardo 2016-05-30 10:22:19 +02:00 committed by jean-pierre charras
parent 48ad75719c
commit 34f223a707
1 changed files with 1 additions and 11 deletions

View File

@ -975,7 +975,6 @@ bool S3D_FILENAME_RESOLVER::ValidateFileName( const wxString& aFileName, bool& h
return false;
wxString filename = aFileName;
wxString lpath;
size_t pos0 = aFileName.find( ':' );
// ensure that the file separators suit the current platform
@ -1008,22 +1007,13 @@ bool S3D_FILENAME_RESOLVER::ValidateFileName( const wxString& aFileName, bool& h
if( pos0 == 0 )
return false;
lpath = filename.substr( 0, pos0 );
wxString lpath = filename.substr( 0, pos0 );
if( wxString::npos != lpath.find_first_of( wxT( "{}[]()%~<>\"='`;:.,&?/\\|$" ) ) )
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;
}