BaseTools: Fix the bug to handle the read-only file
change the 'r+b' to 'rb' for some file's open, since these files we only read it and no need to write. It can fix the bug that the file's attribute had been set to read-only. Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
This commit is contained in:
@ -182,7 +182,7 @@ class FV (FvClassObject):
|
||||
# Write the Fv contents to Buffer
|
||||
#
|
||||
if os.path.isfile(FvOutputFile):
|
||||
FvFileObj = open ( FvOutputFile,'r+b')
|
||||
FvFileObj = open ( FvOutputFile,'rb')
|
||||
|
||||
GenFdsGlobalVariable.VerboseLogger( "\nGenerate %s FV Successfully" %self.UiFvName)
|
||||
GenFdsGlobalVariable.SharpCounter = 0
|
||||
|
Reference in New Issue
Block a user