Bug 578166 - Signing information apparent in the Plug-ins tab of the
About dialog

We should use the canonical representation of the file to ensure that
things like ".." are removed from the path.

Change-Id: I346fb28f2035292705aeb1d0f49a6601f4e09d58
Signed-off-by: Ed Merks <ed.merks@gmail.com>
Reviewed-on: https://git.eclipse.org/r/c/equinox/rt.equinox.p2/+/190783
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/KeySigningInfoFactory.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/KeySigningInfoFactory.java
index 9d7e517..1134dbb 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/KeySigningInfoFactory.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/KeySigningInfoFactory.java
@@ -110,10 +110,10 @@
 
 				private Map<PGPSignature, PGPPublicKey> getDetails(Bundle bundle) {
 					try {
-						File bundleFile = FileLocator.getBundleFile(bundle);
+						File bundleFile = FileLocator.getBundleFile(bundle).getCanonicalFile();
 						Map<PGPSignature, PGPPublicKey> details = bundlePoolArtficactSigningDetails.get(bundleFile);
 						return details;
-					} catch (IOException e) {
+					} catch (IOException | RuntimeException e) {
 						ProvUIActivator.getDefault().getLog()
 								.log(new Status(IStatus.ERROR, ProvUIActivator.PLUGIN_ID, e.getMessage(), e));
 						return null;
@@ -165,7 +165,7 @@
 									}
 								}
 								if (!details.isEmpty()) {
-									result.put(file, details);
+									result.put(file.getCanonicalFile(), details);
 								}
 							}
 						} catch (IOException | PGPException | RuntimeException e) {