summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--EmulatorPkg/Unix/Host/PosixFileSystem.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/EmulatorPkg/Unix/Host/PosixFileSystem.c b/EmulatorPkg/Unix/Host/PosixFileSystem.c
index 40b412e5f2..98e8c894eb 100644
--- a/EmulatorPkg/Unix/Host/PosixFileSystem.c
+++ b/EmulatorPkg/Unix/Host/PosixFileSystem.c
@@ -393,6 +393,7 @@ PosixFileOpen (
// BUGBUG: assume an open of root
// if current location, return current data
//
+ TrailingDash = FALSE;
if ((StrCmp (FileName, L"\\") == 0) ||
(StrCmp (FileName, L".") == 0 && PrivateFile->IsRootDirectory)) {
OpenRoot:
@@ -401,7 +402,6 @@ OpenRoot:
goto Done;
}
- TrailingDash = FALSE;
if (FileName[StrLen (FileName) - 1] == L'\\') {
TrailingDash = TRUE;
FileName[StrLen (FileName) - 1] = 0;