From 974c1e6638feed8365bb697c8c60677952ccd6fa Mon Sep 17 00:00:00 2001 From: Chun-wei Fan Date: Thu, 5 Jan 2023 12:33:40 +0800 Subject: Fix giomm_simple test on Windows One normally cannot attempt to remove (delete) a file on Windows if it is still open, so we must close the resources that are tied to the file before attempting to delete it. Without doing so, the test program will fail on Windows as an exception is caught as the file->remove() call failed since the associated iostream is still open. --- tests/giomm_simple/main.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/giomm_simple/main.cc b/tests/giomm_simple/main.cc index 7d28466a..263f972d 100644 --- a/tests/giomm_simple/main.cc +++ b/tests/giomm_simple/main.cc @@ -92,6 +92,7 @@ main(int, char**) std::cerr << "Gio::InputStream::read() read: " << buffer << std::endl; return EXIT_FAILURE; } + iostream->close(); file->remove(); } catch (const Glib::FileError& ex) -- cgit v1.2.1