diff --git a/src/files.cpp b/src/files.cpp index 5bcc3d7bb..b42aefece 100644 --- a/src/files.cpp +++ b/src/files.cpp @@ -50,6 +50,11 @@ // //========================================================================== +FILE *FileReader::openfd(const char *filename) +{ + return fopen(filename, "rb"); +} + FileReader::FileReader () : File(NULL), Length(0), StartPos(0), FilePos(0), CloseOnDestruct(false) { @@ -93,7 +98,7 @@ FileReader::~FileReader () bool FileReader::Open (const char *filename) { - File = fopen (filename, "rb"); + File = openfd (filename); if (File == NULL) return false; FilePos = 0; StartPos = 0; diff --git a/src/files.h b/src/files.h index 94255b1a0..d0c769ba1 100644 --- a/src/files.h +++ b/src/files.h @@ -93,6 +93,8 @@ public: class FileReader : public FileReaderBase { +protected: + FILE *openfd(const char *filename); public: FileReader (); FileReader (const char *filename);