From add0901a6ebe5e0b58e39b8e6cd1f51cfaa592f1 Mon Sep 17 00:00:00 2001 From: chrishansen69 Date: Tue, 22 Dec 2015 15:58:40 -0200 Subject: [PATCH] fixed a bug in the compiler --- build/src/br/com/chrishansen/aimgames/builder/Build.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/build/src/br/com/chrishansen/aimgames/builder/Build.java b/build/src/br/com/chrishansen/aimgames/builder/Build.java index cef5b2a2..6e021329 100644 --- a/build/src/br/com/chrishansen/aimgames/builder/Build.java +++ b/build/src/br/com/chrishansen/aimgames/builder/Build.java @@ -44,6 +44,8 @@ public static void main(String[] args) throws IOException, InterruptedException String lineTo = line.substring(0, line.indexOf(" ")).replace("\"", ""); //get only argument 1 System.out.println("lineto " + lineTo); File fTo = new File("./" + lineTo); + if (!fTo.exists()) + fTo.createNewFile(); FileInputStream fis = new FileInputStream(fTo); BufferedReader br = new BufferedReader(new InputStreamReader(fis)); String result = ""; @@ -84,6 +86,7 @@ public static void main(String[] args) throws IOException, InterruptedException fos.write(("Build number: #" + (buildnum + 1) + "\r\nBuild date: " + dateFormat.format(date)).getBytes()); fos.close(); } else { + buildFile.createNewFile(); // just write DateFormat dateFormat = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss"); //get current date time with Date()