joxeankoret / diaphora

Diaphora, the most advanced Free and Open Source program diffing tool.
http://diaphora.re
GNU Affero General Public License v3.0
3.58k stars 371 forks source link

Fix re-loaded and re-saved diffs omitting the 2nd DB path #237

Closed CookiePLMonster closed 1 year ago

CookiePLMonster commented 1 year ago

This PR fixes a bug where the following sequence of actions would produce a .diaphora file that fails to load in the plugin:

  1. Create a diff.
  2. Save it to a .diaphora file (from Plugins -> Diaphora - Save).
  3. Relaunch IDA and re-load that file.
  4. Re-save it again (from the RMB context menu).
  5. Attempt to re-load the re-saved database again. Notice the DB cannot be loaded due to an exception thrown inside os.path.exists(diff_db).

With this PR, the following two fixes correct the functionality:

joxeankoret commented 1 year ago

Thank you very much for the patch!