summaryrefslogtreecommitdiff
path: root/src/file.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/file.h')
-rw-r--r--src/file.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/file.h b/src/file.h
index edc431bd..22083a9e 100644
--- a/src/file.h
+++ b/src/file.h
@@ -101,9 +101,17 @@ public:
return _file;
}
+ /** @return Error returned by the fopen / _wfopen call;
+ * errno on POSIX, GetLastError() on Windows.
+ */
+ int open_error() const {
+ return _open_error;
+ }
+
private:
boost::filesystem::path _path;
FILE* _file = nullptr;
+ int _open_error = 0;
};