X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=BaseTools%2FSource%2FPython%2FGenFds%2FEfiSection.py;h=15ebac5705d6b0bf20750cba71168e8f6d88686e;hb=1be2ed90a20618d71ddf34b8a07d038da0b36854;hp=ad953facb98f04166c9065e56943d70f4c4e11cb;hpb=52302d4dee589a5df43a464420c9fe68ba83937d;p=mirror_edk2.git diff --git a/BaseTools/Source/Python/GenFds/EfiSection.py b/BaseTools/Source/Python/GenFds/EfiSection.py index ad953facb9..15ebac5705 100644 --- a/BaseTools/Source/Python/GenFds/EfiSection.py +++ b/BaseTools/Source/Python/GenFds/EfiSection.py @@ -1,9 +1,9 @@ ## @file # process rule section generation # -# Copyright (c) 2007, Intel Corporation +# Copyright (c) 2007, Intel Corporation. All rights reserved.
# -# All rights reserved. This program and the accompanying materials +# This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License # which accompanies this distribution. The full text of the license may be found at # http://opensource.org/licenses/bsd-license.php @@ -20,12 +20,13 @@ import Section from GenFdsGlobalVariable import GenFdsGlobalVariable import subprocess from Ffs import Ffs -import os +import Common.LongFilePathOs as os from CommonDataClass.FdfClass import EfiSectionClassObject -import shutil from Common import EdkLogger from Common.BuildToolError import * from Common.Misc import PeImageClass +from Common.LongFilePathSupport import OpenLongFilePath as open +from Common.LongFilePathSupport import CopyLongFilePath ## generate rule section # @@ -80,11 +81,11 @@ class EfiSection (EfiSectionClassObject): FileList = [] if Filename != None: Filename = GenFdsGlobalVariable.MacroExtend(Filename, Dict) - # check if the path is absolute or relative - if os.path.isabs(Filename): - Filename = os.path.normpath(Filename) - else: - Filename = os.path.normpath(os.path.join(FfsInf.EfiOutputPath, Filename)) + # check if the path is absolute or relative + if os.path.isabs(Filename): + Filename = os.path.normpath(Filename) + else: + Filename = os.path.normpath(os.path.join(FfsInf.EfiOutputPath, Filename)) if not self.Optional: FileList.append(Filename) @@ -237,14 +238,14 @@ class EfiSection (EfiSectionClassObject): if os.path.exists(MapFile): CopyMapFile = os.path.join(OutputPath, ModuleName + '.map') if not os.path.exists(CopyMapFile) or \ - (os.path.getmtime(MapFile) > os.path.getmtime(CopyMapFile)): - shutil.copyfile(MapFile, CopyMapFile) + (os.path.getmtime(MapFile) > os.path.getmtime(CopyMapFile)): + CopyLongFilePath(MapFile, CopyMapFile) if not NoStrip: FileBeforeStrip = os.path.join(OutputPath, ModuleName + '.efi') if not os.path.exists(FileBeforeStrip) or \ (os.path.getmtime(File) > os.path.getmtime(FileBeforeStrip)): - shutil.copyfile(File, FileBeforeStrip) + CopyLongFilePath(File, FileBeforeStrip) StrippedFile = os.path.join(OutputPath, ModuleName + '.stripped') GenFdsGlobalVariable.GenerateFirmwareImage( StrippedFile,