mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-05-23 02:35:55 +08:00
GP-0 do not put modified programs in cache
This commit is contained in:
+7
-1
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user