From c96eb826d721f8563b2455fb773519043104f873 Mon Sep 17 00:00:00 2001 From: Fredrik Osterlind Date: Tue, 1 Nov 2011 09:20:49 +0100 Subject: [PATCH] minor fix on locating config file --- tools/cooja/java/se/sics/cooja/GUI.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tools/cooja/java/se/sics/cooja/GUI.java b/tools/cooja/java/se/sics/cooja/GUI.java index 13625787f..67628b0f8 100644 --- a/tools/cooja/java/se/sics/cooja/GUI.java +++ b/tools/cooja/java/se/sics/cooja/GUI.java @@ -3117,6 +3117,10 @@ public class GUI extends Observable { public Simulation loadSimulationConfig(File file, boolean quick) throws UnsatisfiedLinkError, SimulationCreationException { this.currentConfigFile = file; /* Used to generate config relative paths */ + try { + this.currentConfigFile = this.currentConfigFile.getCanonicalFile(); + } catch (IOException e) { + } try { SAXBuilder builder = new SAXBuilder(); @@ -3236,6 +3240,10 @@ public class GUI extends Observable { */ public void saveSimulationConfig(File file) { this.currentConfigFile = file; /* Used to generate config relative paths */ + try { + this.currentConfigFile = this.currentConfigFile.getCanonicalFile(); + } catch (IOException e) { + } try { // Create and write to document