Fixed GetFullPath

This commit is contained in:
Charles Betros 2015-12-10 23:43:12 -06:00
parent 2ae245e14b
commit 85a255912e

View file

@ -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);