Changed the way to save generated module build.xml to avoid incorrect file name gener...
authorjwang36 <jwang36@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 25 Jul 2006 08:13:58 +0000 (08:13 +0000)
committerjwang36 <jwang36@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 25 Jul 2006 08:13:58 +0000 (08:13 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1091 6f19259b-4bc3-4df7-8a09-765794883524

Tools/Source/GenBuild/org/tianocore/build/ModuleBuildFileGenerator.java

index 08f49478aea6c1084a632223c83b7260a3df4d1d..3e775e514edad9b8304d20cf6d05708647ed20b8 100644 (file)
@@ -16,6 +16,8 @@ import java.util.LinkedHashMap;
 import java.util.LinkedHashSet;\r
 import java.util.Map;\r
 import java.util.Set;\r
+import java.io.FileOutputStream;\r
+import java.io.OutputStreamWriter;\r
 \r
 import javax.xml.parsers.DocumentBuilder;\r
 import javax.xml.parsers.DocumentBuilderFactory;\r
@@ -211,7 +213,8 @@ public class ModuleBuildFileGenerator {
             // generate all directory path\r
             //\r
             (new File(file.getParent())).mkdirs();\r
-            Result result = new StreamResult(file);\r
+            FileOutputStream outputStream = new FileOutputStream(file);\r
+            Result result = new StreamResult(new OutputStreamWriter(outputStream));\r
             \r
             //\r
             // Write the DOM document to the file\r