diff options
author | Marcus Comstedt | 2008-09-20 16:47:31 +0000 |
---|---|---|
committer | Marcus Comstedt | 2008-09-20 16:47:31 +0000 |
commit | 727b220d25c217fde2dd1095ee5fa5f9509fc5f1 (patch) | |
tree | 695a1099888e3089708f58e3c7ea4c1fdbdda1f8 /backends/platform/dc | |
parent | a1072368dee2be2cda131b1641f8b05af1309802 (diff) | |
download | scummvm-rg350-727b220d25c217fde2dd1095ee5fa5f9509fc5f1.tar.gz scummvm-rg350-727b220d25c217fde2dd1095ee5fa5f9509fc5f1.tar.bz2 scummvm-rg350-727b220d25c217fde2dd1095ee5fa5f9509fc5f1.zip |
In the CD filesystem, nothing can be opened for writing, so just
short-circuit any call to openForWriting(). Also, directories and
non-existing files can't be opened for reading either, so just
return 0 for those.
svn-id: r34621
Diffstat (limited to 'backends/platform/dc')
-rw-r--r-- | backends/platform/dc/dc-fs.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/backends/platform/dc/dc-fs.cpp b/backends/platform/dc/dc-fs.cpp index c4f1d76f10..4baba5b7dc 100644 --- a/backends/platform/dc/dc-fs.cpp +++ b/backends/platform/dc/dc-fs.cpp @@ -54,7 +54,7 @@ public: virtual AbstractFilesystemNode *getParent() const; virtual Common::SeekableReadStream *openForReading(); - virtual Common::WriteStream *openForWriting(); + virtual Common::WriteStream *openForWriting() { return 0; } static AbstractFilesystemNode *makeFileNodePath(const Common::String &path); }; @@ -67,6 +67,7 @@ public: virtual bool isDirectory() const { return true; } virtual AbstractFilesystemNode *getChild(const Common::String &n) const; virtual bool getChildren(AbstractFSList &list, ListMode mode, bool hidden) const; + virtual Common::SeekableReadStream *openForReading() { return 0; } }; /* A file/directory which does not exist */ @@ -76,6 +77,7 @@ public: virtual bool exists() const { return false; } virtual bool isReadable() const { return false; } + virtual Common::SeekableReadStream *openForReading() { return 0; } }; AbstractFilesystemNode *RoninCDFileNode::makeFileNodePath(const Common::String &path) { @@ -152,10 +154,6 @@ Common::SeekableReadStream *RoninCDFileNode::openForReading() { return StdioStream::makeFromPath(getPath().c_str(), false); } -Common::WriteStream *RoninCDFileNode::openForWriting() { - return StdioStream::makeFromPath(getPath().c_str(), true); -} - AbstractFilesystemNode *OSystem_Dreamcast::makeRootFileNode() const { return new RoninCDDirectoryNode("/"); } |