Revert "Merge pull request #977 from alexmiller-apple/abspath"

This reverts commit 9881b1d074, reversing
changes made to 6d278e466b.
This commit is contained in:
Alex Miller 2019-01-07 13:07:19 -08:00
parent a9b1770e87
commit cebdb83def
1 changed files with 3 additions and 3 deletions

View File

@ -1717,8 +1717,8 @@ 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(actualFilename) == machineCache.end() ) {
std::string actualFilename = filename;
if ( machineCache.find(filename) == machineCache.end() ) {
if(flags & IAsyncFile::OPEN_ATOMIC_WRITE_AND_CREATE) {
actualFilename = filename + ".part";
auto partFile = machineCache.find(actualFilename);
@ -1745,7 +1745,7 @@ Future< Reference<class IAsyncFile> > Sim2FileSystem::open( std::string filename
// Deletes the given file. If mustBeDurable, returns only when the file is guaranteed to be deleted even after a power failure.
Future< Void > Sim2FileSystem::deleteFile( std::string filename, bool mustBeDurable )
{
return Sim2::deleteFileImpl(&g_sim2, abspath(filename), mustBeDurable);
return Sim2::deleteFileImpl(&g_sim2, filename, mustBeDurable);
}
Future< std::time_t > Sim2FileSystem::lastWriteTime( std::string filename ) {