Remove asserts for absolute paths.

You can, for instance, specify relative paths via the command
line.

Fixes: lp:1767582
* https://bugs.launchpad.net/kicad/+bug/1767582
This commit is contained in:
Jeff Young 2018-09-15 11:38:56 +01:00
parent 3e61a32fbe
commit 872e1e6532
2 changed files with 3 additions and 4 deletions

View File

@ -78,7 +78,9 @@ void PROJECT::SetProjectFullName( const wxString& aFullPathAndName )
m_project_name = aFullPathAndName; m_project_name = aFullPathAndName;
wxASSERT( m_project_name.IsAbsolute() ); // There's no guarantee that this path is absolute. For instance, a relative
// path might have been passed via the command line.
// wxASSERT( m_project_name.IsAbsolute() );
wxASSERT( m_project_name.GetExt() == ProjectFileExtension ); wxASSERT( m_project_name.GetExt() == ProjectFileExtension );

View File

@ -201,9 +201,6 @@ bool SCH_EDIT_FRAME::OpenProjectFiles( const std::vector<wxString>& aFileSet, in
wxString fullFileName( aFileSet[0] ); wxString fullFileName( aFileSet[0] );
// We insist on caller sending us an absolute path, if it does not, we say it's a bug.
wxASSERT_MSG( wxFileName( fullFileName ).IsAbsolute(), wxT( "Path is not absolute!" ) );
if( !LockFile( fullFileName ) ) if( !LockFile( fullFileName ) )
{ {
wxString msg = wxString::Format( _( "Schematic file \"%s\" is already open." ), wxString msg = wxString::Format( _( "Schematic file \"%s\" is already open." ),