]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Source/Python/GenFds/EfiSection.py
There is a limitation on WINDOWS OS for the length of entire file path can’t be large...
[mirror_edk2.git] / BaseTools / Source / Python / GenFds / EfiSection.py
index 3eb4e23842f45d518c485374932f21eab3fa2f0e..15ebac5705d6b0bf20750cba71168e8f6d88686e 100644 (file)
@@ -20,12 +20,13 @@ import Section
 from GenFdsGlobalVariable import GenFdsGlobalVariable\r
 import subprocess\r
 from Ffs import Ffs\r
-import os\r
+import Common.LongFilePathOs as os\r
 from CommonDataClass.FdfClass import EfiSectionClassObject\r
-import shutil\r
 from Common import EdkLogger\r
 from Common.BuildToolError import *\r
 from Common.Misc import PeImageClass\r
+from Common.LongFilePathSupport import OpenLongFilePath as open\r
+from Common.LongFilePathSupport import CopyLongFilePath\r
 \r
 ## generate rule section\r
 #\r
@@ -237,14 +238,14 @@ class EfiSection (EfiSectionClassObject):
                         if os.path.exists(MapFile):\r
                             CopyMapFile = os.path.join(OutputPath, ModuleName + '.map')\r
                             if not os.path.exists(CopyMapFile) or \\r
-                                (os.path.getmtime(MapFile) > os.path.getmtime(CopyMapFile)):\r
-                                shutil.copyfile(MapFile, CopyMapFile)\r
+                                   (os.path.getmtime(MapFile) > os.path.getmtime(CopyMapFile)):\r
+                                CopyLongFilePath(MapFile, CopyMapFile)\r
 \r
                     if not NoStrip:\r
                         FileBeforeStrip = os.path.join(OutputPath, ModuleName + '.efi')\r
                         if not os.path.exists(FileBeforeStrip) or \\r
                             (os.path.getmtime(File) > os.path.getmtime(FileBeforeStrip)):\r
-                            shutil.copyfile(File, FileBeforeStrip)\r
+                            CopyLongFilePath(File, FileBeforeStrip)\r
                         StrippedFile = os.path.join(OutputPath, ModuleName + '.stripped')\r
                         GenFdsGlobalVariable.GenerateFirmwareImage(\r
                                                 StrippedFile,\r