more
[cdsspec-compiler.git] / src / edu / uci / eecs / specCompiler / specExtraction / ParserUtils.java
index c80ce51..201bb8c 100644 (file)
@@ -57,12 +57,14 @@ public class ParserUtils {
                } catch (ParseException e) {
                        e.printStackTrace();
                }
-               
+
                return templateStr;
        }
-       
+
        public static void write2File(File file, ArrayList<String> content) {
-               String newFileName = Environment.GENERATED_FILE_DIR + "/" + file.getName();
+               String newFileName = Environment.GENERATED_FILE_DIR + "/"
+                               + file.getParentFile().getName() + "/" + file.getName();
+
                File newFile = new File(newFileName);
                newFile.getParentFile().mkdirs();
                if (!newFile.exists()) {