OcStringLib: Fix logic

This commit is contained in:
PMheart 2021-02-13 16:52:54 +08:00
parent d3b6d87393
commit 3ecec16f29

View File

@ -230,7 +230,7 @@ UnicodeGetParentDirectory (
//
// Drop trailing slash when getting a directory.
//
if (String[Length - 1] == '\\' && String[Length - 1] == '/') {
if (String[Length - 1] == '\\' || String[Length - 1] == '/') {
--Length;
//
// Paths with just one slash have no root directory (e.g. \\/).