]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Source/Python/GenFds/Fv.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 / Fv.py
index 781c1a045d0ed38eb72f1c1ba3362e388327363d..03a742696fa169721854491b1efc87a69f4fc146 100644 (file)
@@ -1,7 +1,7 @@
 ## @file\r
 # process FV generation\r
 #\r
-#  Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>\r
+#  Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>\r
 #\r
 #  This program and the accompanying materials\r
 #  are licensed and made available under the terms and conditions of the BSD License\r
@@ -15,8 +15,7 @@
 ##\r
 # Import Modules\r
 #\r
-import os\r
-import shutil\r
+import Common.LongFilePathOs as os\r
 import subprocess\r
 import StringIO\r
 from struct import *\r
@@ -27,6 +26,8 @@ from GenFdsGlobalVariable import GenFdsGlobalVariable
 from GenFds import GenFds\r
 from CommonDataClass.FdfClass import FvClassObject\r
 from Common.Misc import SaveFileOnChange\r
+from Common.LongFilePathSupport import CopyLongFilePath\r
+from Common.LongFilePathSupport import OpenLongFilePath as open\r
 \r
 T_CHAR_LF = '\n'\r
 \r
@@ -128,7 +129,7 @@ class FV (FvClassObject):
             FvOutputFile = self.CreateFileName\r
 \r
         FvInfoFileName = os.path.join(GenFdsGlobalVariable.FfsDir, self.UiFvName + '.inf')\r
-        shutil.copy(GenFdsGlobalVariable.FvAddressFileName, FvInfoFileName)\r
+        CopyLongFilePath(GenFdsGlobalVariable.FvAddressFileName, FvInfoFileName)\r
         OrigFvInfo = None\r
         if os.path.exists (FvInfoFileName):\r
             OrigFvInfo = open(FvInfoFileName, 'r').read()\r