]> git.proxmox.com Git - mirror_edk2.git/blobdiff - Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/toolchain/Preferences.java
1. Fix EDKT417: System hangs to setup build preference when there is no target.txt...
[mirror_edk2.git] / Tools / Java / Source / FrameworkWizard / src / org / tianocore / frameworkwizard / toolchain / Preferences.java
index b7acc7da29414752105a9097ab8d0b0a20442582..dcc4b42a36bbcf0e2456840a47253b8d1412ee6c 100644 (file)
@@ -162,7 +162,7 @@ public class Preferences extends IFrame {
 \r
     private JTextField jTextFieldThreadCount = null;\r
     \r
-    private String threadCount;\r
+    private String threadCount = "";\r
     \r
     private boolean threadEnabled = false;\r
 \r
@@ -547,7 +547,6 @@ public class Preferences extends IFrame {
      * \r
      */\r
     private void init() {\r
-\r
         for (int i = 0; i < maxTargetLines; i++) {\r
             targetLines[i] = null;\r
             targetLineNumber[i] = -1;\r
@@ -1119,6 +1118,9 @@ public class Preferences extends IFrame {
         File toFile = new File(bakFile);\r
         FileInputStream fromTxt = null;\r
         FileOutputStream toBak = null;\r
+        if (!fromFile.exists()) {\r
+            fromFile.createNewFile();\r
+        }\r
         try {\r
             fromTxt = new FileInputStream(fromFile);\r
             toBak = new FileOutputStream(toFile);\r