Close workingCopy in workingCopyPathAs() for correct error handling

This commit is contained in:
Martchus 2019-12-15 19:01:04 +01:00
parent 07ae1588fa
commit 1bdc088b54
1 changed files with 1 additions and 0 deletions

View File

@ -330,6 +330,7 @@ string TestApplication::workingCopyPathAs(
return string(); return string();
} }
workingCopy << origFile.rdbuf(); workingCopy << origFile.rdbuf();
workingCopy.close();
if (!origFile.fail() && !workingCopy.fail()) { if (!origFile.fail() && !workingCopy.fail()) {
return workingCopyPath; return workingCopyPath;
} }