minor bugfix to look up correct filename in cache

(manually cherry-picked from flat-buffers branch)
This commit is contained in:
Markus Pilman 2018-12-13 09:57:45 -08:00 committed by Alex Miller
parent 0207831fd6
commit 4ae701d8a9
1 changed files with 1 additions and 1 deletions

View File

@ -1718,7 +1718,7 @@ Future< Reference<class IAsyncFile> > Sim2FileSystem::open( std::string filename
if (flags & IAsyncFile::OPEN_UNCACHED) {
auto& machineCache = g_simulator.getCurrentProcess()->machine->openFiles;
std::string actualFilename = abspath(filename);
if ( machineCache.find(filename) == machineCache.end() ) {
if ( machineCache.find(actualFilename) == machineCache.end() ) {
if(flags & IAsyncFile::OPEN_ATOMIC_WRITE_AND_CREATE) {
actualFilename = filename + ".part";
auto partFile = machineCache.find(actualFilename);