mirror of
https://github.com/znc/znc.git
synced 2026-08-07 17:33:34 +02:00
CFile: Add an error flag
Whenever an error happens with some file operation, the error flag is now set. This is especially interesting for tracking errors from Write(). Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
@@ -120,6 +120,9 @@ public:
|
||||
CString GetShortName() const;
|
||||
CString GetDir() const;
|
||||
|
||||
bool HadError() const { return m_bHadError; }
|
||||
void ResetError() { m_bHadError = false; }
|
||||
|
||||
static void InitHomePath(const CString& sFallback);
|
||||
static const CString& GetHomePath() { return m_sHomePath; }
|
||||
|
||||
@@ -129,6 +132,7 @@ private:
|
||||
|
||||
CString m_sBuffer;
|
||||
int m_iFD;
|
||||
bool m_bHadError;
|
||||
|
||||
static CString m_sHomePath;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user