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) public static string GetFullPath(DirectoryEntry aEntry)
{ {
FileSystemHelpers.Debug("VFSManager.GetFullPath : aEntry.mName = " + aEntry?.mName); FileSystemHelpers.Debug("VFSManager.GetFullPath : aEntry.mName = " + aEntry?.mName);
var xEntry = aEntry?.mParent; var xParent = aEntry?.mParent;
string xPath = aEntry?.mName; string xPath = aEntry?.mName;
while (xEntry != null) while (xParent != null)
{ {
FileSystemHelpers.Debug("VFSManager.GetFullPath : xEntry is not null."); xPath = xParent.mName + xPath;
xPath = string.Concat(xPath, xEntry.mName);
FileSystemHelpers.Debug("VFSManager.GetFullPath : xPath = " + xPath); FileSystemHelpers.Debug("VFSManager.GetFullPath : xPath = " + xPath);
xEntry = aEntry.mParent; xParent = xParent.mParent;
} }
FileSystemHelpers.Debug("VFSManager.GetFullPath : xPath = " + xPath); FileSystemHelpers.Debug("VFSManager.GetFullPath : xPath = " + xPath);