diff --git a/Source/Engine/Platform/Apple/AppleFileSystem.cpp b/Source/Engine/Platform/Apple/AppleFileSystem.cpp index 6c87428cc..437f09288 100644 --- a/Source/Engine/Platform/Apple/AppleFileSystem.cpp +++ b/Source/Engine/Platform/Apple/AppleFileSystem.cpp @@ -184,7 +184,7 @@ bool AppleFileSystem::GetChildDirectories(Array& results, const String& // Determinate a full path of an entry char fullPath[256]; ASSERT(pathLength + strlen(entry->d_name) < ARRAY_COUNT(fullPath)); - strcpy(fullPath, path); + strcpy(fullPath, pathStr); strcat(fullPath, "/"); strcat(fullPath, entry->d_name); diff --git a/Source/Engine/Platform/Linux/LinuxFileSystem.cpp b/Source/Engine/Platform/Linux/LinuxFileSystem.cpp index 728b2c41b..69afa23a4 100644 --- a/Source/Engine/Platform/Linux/LinuxFileSystem.cpp +++ b/Source/Engine/Platform/Linux/LinuxFileSystem.cpp @@ -330,7 +330,7 @@ bool LinuxFileSystem::GetChildDirectories(Array& results, const String& // Determinate a full path of an entry char fullPath[256]; ASSERT(pathLength + strlen(entry->d_name) < ARRAY_COUNT(fullPath)); - strcpy(fullPath, path); + strcpy(fullPath, pathStr); strcat(fullPath, "/"); strcat(fullPath, entry->d_name);