From 4049ec5e8bdddbc48689521a26bf47236c2b490d Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Tue, 3 Sep 2024 17:55:11 +0200 Subject: Fix a few places where we should use dcp::File::open_error() to get a more accurate error number on Windows. --- src/lib/string_text_file.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/lib/string_text_file.cc') diff --git a/src/lib/string_text_file.cc b/src/lib/string_text_file.cc index 9b43b35a6..f5d5e0d2a 100644 --- a/src/lib/string_text_file.cc +++ b/src/lib/string_text_file.cc @@ -57,7 +57,7 @@ StringTextFile::StringTextFile (shared_ptr content) if (ext == ".stl") { dcp::File f(content->path(0), "rb"); if (!f) { - throw OpenFileError (f.path(), errno, OpenFileError::READ); + throw OpenFileError(f.path(), f.open_error(), OpenFileError::READ); } try { reader.reset(new sub::STLBinaryReader(f.get())); -- cgit v1.2.3