fb1cab3e07
cacheLib() was unconditionally calling Load() for new caches even when buffering was enabled, introduced bye013691d02to fix issue #22191. This broke "Save Library As" because the target file doesn't exist yet, causing Load() to throw IO_ERROR. The exception was caught but no symbols were added to the cache, resulting in an empty file Additionally, the unbuffered library save path was passing the library nickname instead of the target file path to the plugin's LoadSymbol/ SaveSymbol calls. While this was always wrong, it was masked beforee013691d02because buffering mode skipped Load() entirely. Fix cacheLib() to only call Load() for new caches when the library file actually exists on disk, and fix the unbuffered save path to use the target file path. Fixes https://gitlab.com/kicad/code/kicad/-/issues/23337