Eeschema: fix loading symbol libraries with dot in file name.
Initializing wxFileName objects by using string assignment or the single string argument ctor will cause wxFileName to parse everything to the right of the first dot as the file extension. Therefore, file names such as foo.1.lib and bar.baz.lib will fail. This is probably not the only place in the KiCad source where this can occur. Fixes lp:1700331 https://bugs.launchpad.net/kicad/+bug/1700331
This commit is contained in:
parent
2237de0153
commit
4130083445
|
@ -585,7 +585,13 @@ void PART_LIBS::LoadAllLibraries( PROJECT* aProject, bool aShowProgress )
|
|||
lib_dialog.Update( i, _( "Loading " + lib_names[i] ) );
|
||||
}
|
||||
|
||||
wxFileName fn = lib_names[i];
|
||||
wxFileName fn;
|
||||
|
||||
// Do not use string assignment or single string ctor when initializing a wxFileName
|
||||
// object. File names with dots other than the file extension will be parsed
|
||||
// incorrectly by wxFileName.
|
||||
fn.SetName( lib_names[i] );
|
||||
|
||||
// lib_names[] does not store the file extension. Set it:
|
||||
fn.SetExt( SchematicLibraryFileExtension );
|
||||
|
||||
|
|
Loading…
Reference in New Issue