mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-13 03:33:48 +00:00
* BugFix: Correct the VFS dumpDirectories function not honoring noBasePath properly.
This commit is contained in:
parent
7665076b19
commit
46b8c3d15d
1 changed files with 16 additions and 1 deletions
|
|
@ -602,8 +602,23 @@ bool MountSystem::_dumpDirectories(DirectoryRef directory, Vector<StringTableEnt
|
|||
|
||||
for (U32 iteration = 0; iteration < directoryPaths.size(); ++iteration)
|
||||
{
|
||||
directories.push_back(StringTable->insert(directoryPaths[iteration].getFullPath().c_str(), true));
|
||||
const Path& directoryPath = directoryPaths[iteration];
|
||||
|
||||
String directoryPathString = directoryPath.getFullPath().c_str();
|
||||
if (noBasePath)
|
||||
{
|
||||
Path newDirectoryPath;
|
||||
for (U32 iteration = basePath.getDirectoryCount() + 1; iteration < directoryPath.getDirectoryCount(); ++iteration)
|
||||
{
|
||||
newDirectoryPath.appendPath(directoryPath.getDirectory(iteration));
|
||||
}
|
||||
|
||||
newDirectoryPath.setFileName(directoryPath.getFileName());
|
||||
newDirectoryPath.setExtension(directoryPath.getExtension());
|
||||
directoryPathString = newDirectoryPath.getFullPathWithoutRoot();
|
||||
}
|
||||
|
||||
directories.push_back(StringTable->insert(directoryPathString, true));
|
||||
if (currentDepth <= depth)
|
||||
{
|
||||
DirectoryRef nextDirectory = OpenDirectory(directoryPaths[iteration]);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue