]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Source/C/BootSectImage/bootsectimage.c
There is a limitation on WINDOWS OS for the length of entire file path can’t be large...
[mirror_edk2.git] / BaseTools / Source / C / BootSectImage / bootsectimage.c
index 36e896e5c4bee0866715711e17587e6f481ff12c..fd367c28b36d100995d762cb3515b51c60ed7144 100644 (file)
@@ -4,7 +4,7 @@ Abstract:
   Patch the BPB information in boot sector image file.\r
   Patch the MBR code in MBR image file.\r
 \r
-Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials                          \r
 are licensed and made available under the terms and conditions of the BSD License         \r
 which accompanies this distribution.  The full text of the license may be found at        \r
@@ -116,7 +116,7 @@ Return:
   FILE *FileHandle;\r
   int  result;\r
 \r
-  FileHandle = fopen (FileName, "r+b");\r
+  FileHandle = fopen (LongFilePath (FileName), "r+b");\r
   if (FileHandle == NULL) {\r
     DebugMsg (NULL, 0, DEBUG_ERROR, NULL, "Open file: %s", FileName);\r
     return 0;\r
@@ -154,7 +154,7 @@ Return:
   FILE *FileHandle;\r
   int  result;\r
 \r
-  FileHandle = fopen (FileName, "rb");\r
+  FileHandle = fopen (LongFilePath (FileName), "rb");\r
   if (FileHandle == NULL) {\r
     DebugMsg (NULL, 0, DEBUG_ERROR, NULL, "ERROR: E0001: Error opening file: %s", FileName);\r
     return 0;\r