Cook on the Fly: FStreamingNetworkPlatformFile::DirectoryExists() returns false for sub-dirs of Binaries/

Hello,

TLDR: `FStreamingNetworkPlatformFile::DirectoryExists()` does not store any sub-dirs under Engine/binaries nor under <GameName>/binaries (might be more than just Binaries, I don’t know for sure)

*Details*

When packaging our game (Client Win964) there are ThirdParty “FooPlugin” DLLs copied to a sub-dir of the game’s Binaries directory, for example:

GameName\Binaries\Win64\FooPlugin\abc.dll GameName\Binaries\Win64\FooPlugin\def.dll ...

And the FooPlugin’s runtime module (IModuleInterface) has code to register all of its needed DLLs like so:

`if (!FPaths::DirectoryExists(fooPluginDllsDir))
{
UE_LOG(LogFoo, Fatal, “FooPlugin DLL path not found!”);
return;
}

// Find all *.dll files in ‘fooPluginDllsDir’ and call FPlatformProcess::GetDllHandle() on each one`

This works fine in fully cooked builds but in cook on the fly it fails with `FPaths::DirectoryExists()` returning false.

Spelunking into the engine code I see that `FPaths::DirectoryExists()` ends up in `FStreamingNetworkPlatformFile::DirectoryExists()`, which searches in the `ServerFiles` member var to find the requested directory. And looking through `ServerFiles` I see that the TOC never contains any sub-dirs under Binaries/ (neither for the game nor the engine).

For example, there is only one entry for the Engine’s Binaries dir as `../../../Engine/binaries` even though on disk there exists sub-dirs with additional sub-dirs + files:

Engine/binaries/ThirdParty Engine/binaries/Win64Is this a known issue that is planned on being fixed? We use DirectoryExists() when collecting files/DLLs in a specific directory and unfortunately this functionality is broken for cook on the fly.

Thanks,

Andrej

Hey Andrej, sorry for the late response. I’ve tried to track this down why this might be happening and it’s probably due the binaries directory is added to the list of directories to be ignored

in Engine\Source\Runtime\NetworkFileSystem\Private\NetworkFileServerConnection.cpp FNetworkFileServerClientConnection::ProcessGetFileList

I don’t believe this is a known issue and I’ve created a Jira ticket UE-281885 to track this issue.