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:
Uli Schlachter
2011-03-31 18:00:07 +02:00
parent 23fb4df67a
commit 70358cabdd
2 changed files with 47 additions and 8 deletions
+4
View File
@@ -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;