diff --git a/Engine/source/core/volume.cpp b/Engine/source/core/volume.cpp index 3f4b79c42..5e58ad452 100644 --- a/Engine/source/core/volume.cpp +++ b/Engine/source/core/volume.cpp @@ -608,9 +608,13 @@ bool MountSystem::_dumpDirectories(DirectoryRef directory, Vector basePath.getDirectoryCount()) + { + newDirectoryPath.setPath(newDirectoryPath.getPath() + "/"); + } + newDirectoryPath.setPath(newDirectoryPath.getPath() + directoryPath.getDirectory(iteration)); } newDirectoryPath.setFileName(directoryPath.getFileName()); @@ -621,7 +625,9 @@ bool MountSystem::_dumpDirectories(DirectoryRef directory, Vectorinsert(directoryPathString, true)); if (currentDepth <= depth) { - DirectoryRef nextDirectory = OpenDirectory(directoryPaths[iteration]); + const String subdirectoryPath = directoryPath.getFullPath() + "/"; + + DirectoryRef nextDirectory = OpenDirectory(subdirectoryPath); _dumpDirectories(nextDirectory, directories, depth, noBasePath, currentDepth + 1, basePath); } } @@ -637,7 +643,7 @@ bool MountSystem::dumpDirectories(const Path& path, Vector& di } DirectoryRef sourceDirectory = openDirectory(path); - return _dumpDirectories(sourceDirectory, directories, depth, noBasePath, 0, path); + return _dumpDirectories(sourceDirectory, directories, depth, noBasePath, 1, path); } FileRef MountSystem::createFile(const Path& path)