Преглед на файлове

Merge pull request #988 from Azaezel/alpha41/getDirectoryList

fix getDirectoryList
Brian Roberts преди 2 години
родител
ревизия
6cb34ab3e9
променени са 1 файла, в които са добавени 1 реда и са изтрити 3 реда
  1. 1 3
      Engine/source/console/fileSystemFunctions.cpp

+ 1 - 3
Engine/source/console/fileSystemFunctions.cpp

@@ -489,9 +489,7 @@ DefineEngineFunction(getDirectoryList, String, ( const char* path, S32 depth ),
    // Append a trailing backslash if it's not present already.
    if (fullpath[dStrlen(fullpath) - 1] != '/')
    {
-      S32 pos = dStrlen(fullpath);
-      fullpath[pos - 1] = '/';
-      fullpath[pos] = '\0';
+      dStrcat(fullpath, "/\0", 1024);
    }
 
    // Dump the directories.