fix: We cannot inject faults after renaming the file, because we could end up with two asyncFileNonDurable open for the same file

This commit is contained in:
Evan Tschannen 2017-09-21 18:11:18 -07:00
parent 995587b12b
commit 4809bd8f62
1 changed files with 2 additions and 2 deletions

View File

@ -1542,12 +1542,12 @@ void renameFile( std::string const& fromPath, std::string const& toPath ) {
INJECT_FAULT( io_error, "renameFile" );
#ifdef _WIN32
if (MoveFile( fromPath.c_str(), toPath.c_str() )) {
renamedFile();
//renamedFile();
return;
}
#elif (defined(__linux__) || defined(__APPLE__))
if (!rename( fromPath.c_str(), toPath.c_str() )) {
renamedFile();
//renamedFile();
return;
}
#else