Eeschema: Fix an issue with new schematic plugin: it expects absolute paths for libraries, but if a library is in the current working dir, its filename was not absolute, and the lib was silently ignored. Now, filenames are always absolute.
This commit is contained in:
parent
8734757054
commit
318429590e
|
@ -926,7 +926,6 @@ void PART_LIBS::LoadAllLibraries( PROJECT* aProject ) throw( IO_ERROR, boost::ba
|
||||||
fn.Clear();
|
fn.Clear();
|
||||||
fn.SetName( lib_names[i] );
|
fn.SetName( lib_names[i] );
|
||||||
fn.SetExt( SchematicLibraryFileExtension );
|
fn.SetExt( SchematicLibraryFileExtension );
|
||||||
|
|
||||||
// Skip if the file name is not valid..
|
// Skip if the file name is not valid..
|
||||||
if( !fn.IsOk() )
|
if( !fn.IsOk() )
|
||||||
continue;
|
continue;
|
||||||
|
@ -943,7 +942,13 @@ void PART_LIBS::LoadAllLibraries( PROJECT* aProject ) throw( IO_ERROR, boost::ba
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{ // ensure the lib filename has a absolute path.
|
||||||
|
// If the lib has no absolute path, and is found in the cwd by fn.FileExists(),
|
||||||
|
// make a full absolute path, to avoid issues with load library functions which
|
||||||
|
// expects an absolute path.
|
||||||
|
if( !fn.IsAbsolute() )
|
||||||
|
fn.Normalize();
|
||||||
|
|
||||||
filename = fn.GetFullPath();
|
filename = fn.GetFullPath();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue