Skip to content
Snippets Groups Projects
Commit b2d5dca4 authored by Henry Weller's avatar Henry Weller
Browse files

functionObjects::timeActivatedFileUpdate: Copy file then move

Patch contributed by Mattijs Janssens
Resolves bug-report http://bugs.openfoam.org/view.php?id=2324
parent 146f7e6b
Branches
Tags
No related merge requests found
......@@ -65,7 +65,9 @@ void Foam::functionObjects::timeActivatedFileUpdate::updateFile()
Info<< nl << type() << ": copying file" << nl << timeVsFile_[i].second()
<< nl << "to:" << nl << fileToUpdate_ << nl << endl;
cp(timeVsFile_[i].second(), fileToUpdate_);
fileName destFile(fileToUpdate_ + Foam::name(pid()));
cp(timeVsFile_[i].second(), destFile);
mv(destFile, fileToUpdate_);
lastIndex_ = i;
}
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment