diff options
Diffstat (limited to 'ShellPkg/Application')
-rw-r--r-- | ShellPkg/Application/Shell/ShellProtocol.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/ShellPkg/Application/Shell/ShellProtocol.c b/ShellPkg/Application/Shell/ShellProtocol.c index e2da5d37ad..2d587ea03b 100644 --- a/ShellPkg/Application/Shell/ShellProtocol.c +++ b/ShellPkg/Application/Shell/ShellProtocol.c @@ -585,7 +585,11 @@ EfiShellGetDevicePathFromFilePath( //
// build the full device path
//
- DevicePathForReturn = FileDevicePath(Handle, Path+StrLen(MapName)+1);
+ if (*(Path+StrLen(MapName)+1) == CHAR_NULL) {
+ DevicePathForReturn = FileDevicePath(Handle, L"\\");
+ } else {
+ DevicePathForReturn = FileDevicePath(Handle, Path+StrLen(MapName)+1);
+ }
FreePool(MapName);
if (DevicePathCopyForFree != NULL) {
|