From 9cf6c42fa1c6facdbdf807a9478c0d1af0a053a5 Mon Sep 17 00:00:00 2001 From: Robert MacGregor Date: Tue, 21 Dec 2021 14:52:31 -0500 Subject: [PATCH] * Adjustment: Tweak more manual memory management to use dStrcpy and use the VFS for directory queries always now. --- Engine/source/console/fileSystemFunctions.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/Engine/source/console/fileSystemFunctions.cpp b/Engine/source/console/fileSystemFunctions.cpp index c9a0f5ae2..bbeddaca4 100644 --- a/Engine/source/console/fileSystemFunctions.cpp +++ b/Engine/source/console/fileSystemFunctions.cpp @@ -457,8 +457,7 @@ DefineEngineFunction(getDirectoryList, String, ( const char* path, S32 depth ), char fullpath[1024]; #ifdef TORQUE_SECURE_VFS - dMemset(fullpath, 0x00, sizeof(fullpath)); - dMemcpy(fullpath, path, dStrlen(path)); + dStrcpy(fullpath, path, sizeof(fullpath)); #else Platform::makeFullPathName(String::compare(path, "/") == 0 ? "" : path, fullpath, sizeof(fullpath)); #endif @@ -475,11 +474,7 @@ DefineEngineFunction(getDirectoryList, String, ( const char* path, S32 depth ), // Dump the directories. Vector directories; -#ifdef TORQUE_SECURE_VFS Torque::FS::DumpDirectories(fullpath, directories, depth, true); -#else - Platform::dumpDirectories(fullpath, directories, depth, true); -#endif if( directories.empty() ) return "";