GP-0 do not put modified programs in cache

This commit is contained in:
ghidra1
2023-12-19 15:58:08 -05:00
parent 719373e327
commit 4f2c3b720a
@@ -304,7 +304,13 @@ public class ProgramManagerPlugin extends Plugin implements ProgramManager, Opti
program = programMgr.getOpenProgram(locator);
if (program != null) {
program.addConsumer(consumer);
programCache.put(locator, program);
if (!program.isChanged()) {
// Don't put modified programs into the cache.
// NOTE: This will prevent upgraded programs from being added to the cache
// which are already open in the tool. This could be improved if we could
// distinguish between upgrade and non-upgrade changes.
programCache.put(locator, program);
}
return program;
}