diff --git a/source/Cosmos.System/FileSystem/VFS/VFSManager.cs b/source/Cosmos.System/FileSystem/VFS/VFSManager.cs index a02c9a741..63b9b064c 100644 --- a/source/Cosmos.System/FileSystem/VFS/VFSManager.cs +++ b/source/Cosmos.System/FileSystem/VFS/VFSManager.cs @@ -252,15 +252,14 @@ namespace Cosmos.System.FileSystem.VFS public static string GetFullPath(DirectoryEntry aEntry) { FileSystemHelpers.Debug("VFSManager.GetFullPath : aEntry.mName = " + aEntry?.mName); - var xEntry = aEntry?.mParent; + var xParent = aEntry?.mParent; string xPath = aEntry?.mName; - while (xEntry != null) - { - FileSystemHelpers.Debug("VFSManager.GetFullPath : xEntry is not null."); - xPath = string.Concat(xPath, xEntry.mName); + while (xParent != null) + { + xPath = xParent.mName + xPath; FileSystemHelpers.Debug("VFSManager.GetFullPath : xPath = " + xPath); - xEntry = aEntry.mParent; + xParent = xParent.mParent; } FileSystemHelpers.Debug("VFSManager.GetFullPath : xPath = " + xPath);