- PathForReturn = NULL;\r
- ASSERT(FALSE);\r
- } else {\r
- //\r
- // append the path part onto the filepath.\r
- //\r
- ASSERT((PathForReturn == NULL && PathSize == 0) || (PathForReturn != NULL));\r
-\r
- AlignedNode = AllocateCopyPool (DevicePathNodeLength(FilePath), FilePath);\r
- ASSERT (AlignedNode != NULL);\r
-\r
- // File Path Device Path Nodes 'can optionally add a "\" separator to\r
- // the beginning and/or the end of the Path Name string.'\r
- // (UEFI Spec 2.4 section 9.3.6.4).\r
- // If necessary, add a "\", but otherwise don't\r
- // (This is specified in the above section, and also implied by the\r
- // UEFI Shell spec section 3.7)\r
- if ((PathSize != 0) &&\r
- (PathForReturn != NULL) &&\r
- (PathForReturn[PathSize - 1] != L'\\') &&\r
- (AlignedNode->PathName[0] != L'\\')) {\r
- PathForReturn = StrnCatGrow (&PathForReturn, &PathSize, L"\\", 1);\r
- }\r