mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-13 03:33:48 +00:00
* Adjustment: Tweak more manual memory management to use dStrcpy and use the VFS for directory queries always now.
This commit is contained in:
parent
abb4e558dc
commit
9cf6c42fa1
1 changed files with 1 additions and 6 deletions
|
|
@ -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<StringTableEntry> directories;
|
||||
#ifdef TORQUE_SECURE_VFS
|
||||
Torque::FS::DumpDirectories(fullpath, directories, depth, true);
|
||||
#else
|
||||
Platform::dumpDirectories(fullpath, directories, depth, true);
|
||||
#endif
|
||||
|
||||
if( directories.empty() )
|
||||
return "";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue