From 5aeafb3a254e7cd9e1fb69a0d391388a51c6e210 Mon Sep 17 00:00:00 2001
From: Ruiyu Ni <ruiyu.ni@intel.com>
Date: Mon, 8 Aug 2016 18:21:32 +0800
Subject: [PATCH] ShellPkg/ls: Display the correct directory path

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Tapan Shah <tapandshah@hpe.com>
---
 ShellPkg/Library/UefiShellLevel2CommandsLib/Ls.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/ShellPkg/Library/UefiShellLevel2CommandsLib/Ls.c b/ShellPkg/Library/UefiShellLevel2CommandsLib/Ls.c
index 6d3cc95f4b..0b8019516f 100644
--- a/ShellPkg/Library/UefiShellLevel2CommandsLib/Ls.c
+++ b/ShellPkg/Library/UefiShellLevel2CommandsLib/Ls.c
@@ -442,6 +442,7 @@ PrintLsOutput(
       }
 
       if (!Sfo && !HeaderPrinted) {
+        PathRemoveLastItem (CorrectedPath);
         PrintNonSfoHeader(CorrectedPath);
       }
       PrintFileInformation(Sfo, Node, &FileCount, &FileSize, &DirCount);