From 221c10ec201786ff9e0eaaa82e0f4f7f87f3fa7f Mon Sep 17 00:00:00 2001 From: hansen <dominik_hansen@web.de> Date: Sat, 28 Jun 2014 12:48:43 +0200 Subject: [PATCH] TLC makes sure that the module file is correct in regard to case sensitivity. Probcli converts the file name to lower case. Now the translator provides the canonical name of the file to TLC. --- src/main/java/de/tla2bAst/Translator.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/main/java/de/tla2bAst/Translator.java b/src/main/java/de/tla2bAst/Translator.java index 3f6ce1f..1a1e0f5 100644 --- a/src/main/java/de/tla2bAst/Translator.java +++ b/src/main/java/de/tla2bAst/Translator.java @@ -1,6 +1,5 @@ package de.tla2bAst; -import java.io.BufferedOutputStream; import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.File; @@ -9,7 +8,6 @@ import java.io.FileOutputStream; import java.io.FileReader; import java.io.IOException; import java.io.OutputStreamWriter; -import java.io.PrintStream; import java.io.PrintWriter; import java.io.UnsupportedEncodingException; import java.util.Date; @@ -87,6 +85,12 @@ public class Translator implements TranslationGlobals { throw new RuntimeException("Can not find module file: '" + moduleFileName + "'"); } + try { + moduleFile = moduleFile.getCanonicalFile(); + } catch (IOException e) { + throw new RuntimeException("Can not access module file: '" + + moduleFileName + "'"); + } } // Used for Testing -- GitLab