Added calling of remove() before fopen() when creating file. This will speed up file...
authorjwang36 <jwang36@7335b38e-4728-0410-8992-fb3ffe349368>
Fri, 15 Feb 2008 07:35:59 +0000 (07:35 +0000)
committerjwang36 <jwang36@7335b38e-4728-0410-8992-fb3ffe349368>
Fri, 15 Feb 2008 07:35:59 +0000 (07:35 +0000)
git-svn-id: https://buildtools.tianocore.org/svn/buildtools/trunk/BaseTools@1003 7335b38e-4728-0410-8992-fb3ffe349368

Source/C/GenFfs/GenFfs.c
Source/C/GenSec/GenSec.c

index 5f4fe4d..786be0d 100644 (file)
@@ -806,6 +806,7 @@ Returns:
   //\r
   // Open output file to write ffs data.\r
   //\r
+  remove(OutputFileName);\r
   FfsFile = fopen (OutputFileName, "wb");\r
   if (FfsFile == NULL) {\r
     Error (NULL, 0, 0001, "Error opening file", OutputFileName);\r
index fde6a46..8603479 100644 (file)
@@ -1094,6 +1094,7 @@ Returns:
   //\r
   // Open output file\r
   //\r
+  remove(OutputFileName);\r
   OutFile = fopen (OutputFileName, "wb");\r
   if (OutFile == NULL) {\r
     Error (NULL, 0, 0001, "Error opening file", OutputFileName);\r