From b76879d727de4c4bf0e0593311b0d45501fe116b Mon Sep 17 00:00:00 2001 From: Ben Soares Date: Tue, 25 Jun 2024 00:23:37 +0100 Subject: [PATCH] JAL-3631 Report getCanonicalPath for installer appdir --- src/jalview/bin/Cache.java | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/src/jalview/bin/Cache.java b/src/jalview/bin/Cache.java index 28d5179..9d76cd2 100755 --- a/src/jalview/bin/Cache.java +++ b/src/jalview/bin/Cache.java @@ -1276,10 +1276,28 @@ public class Cache System.getProperty("sys.install4jVersion"), "\n", null); if (extra) { + String installerAppdir = System.getProperty("installer.appdir"); + if (installerAppdir != null) + { + try + { + String temp = new File(installerAppdir).getCanonicalPath(); + installerAppdir = temp; + } catch (IOException e) + { + installerAppdir = "(non-canonical) " + installerAppdir; + Console.warn( + "Could not get canonical path for installer appdir, leaving as is."); + } + } + else + { + installerAppdir = "null: " + installerAppdir; + } appendIfNotNull(sb, "Installer template version: ", System.getProperty("installer.template_version"), "\n", null); - appendIfNotNull(sb, "Installer appdir: ", - System.getProperty("installer.appdir"), "\n", null); + appendIfNotNull(sb, "Installer appdir: ", installerAppdir, "\n", + null); appendIfNotNull(sb, "Installer extrainfo: ", System.getProperty("installer.extrainfo"), "\n", null); } -- 1.7.10.2