From 1bdc088b5436425a63bd572ed4fd5e6d58884b55 Mon Sep 17 00:00:00 2001 From: Martchus Date: Sun, 15 Dec 2019 19:01:04 +0100 Subject: [PATCH] Close workingCopy in workingCopyPathAs() for correct error handling --- tests/testutils.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/testutils.cpp b/tests/testutils.cpp index ebb0077..62b7535 100644 --- a/tests/testutils.cpp +++ b/tests/testutils.cpp @@ -330,6 +330,7 @@ string TestApplication::workingCopyPathAs( return string(); } workingCopy << origFile.rdbuf(); + workingCopy.close(); if (!origFile.fail() && !workingCopy.fail()) { return workingCopyPath; }