aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Horn2008-08-04 13:25:30 +0000
committerMax Horn2008-08-04 13:25:30 +0000
commit05968b18c9dac22951618ce885d8e1587d94d324 (patch)
tree3f2b2e73333c68cd979947400b92dd1c2e9bb0e4
parentd061e50a7efc5d5201daff760341b10bc80f55bd (diff)
downloadscummvm-rg350-05968b18c9dac22951618ce885d8e1587d94d324.tar.gz
scummvm-rg350-05968b18c9dac22951618ce885d8e1587d94d324.tar.bz2
scummvm-rg350-05968b18c9dac22951618ce885d8e1587d94d324.zip
Modified DumpFile::open to accept non-existing nodes, and to actually open files in write mode -- d'oh
svn-id: r33609
-rw-r--r--common/file.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/common/file.cpp b/common/file.cpp
index 94b3e48930..fb837b9499 100644
--- a/common/file.cpp
+++ b/common/file.cpp
@@ -497,10 +497,7 @@ bool DumpFile::open(const String &filename) {
bool DumpFile::open(const FilesystemNode &node) {
assert(!_handle);
- if (!node.exists()) {
- warning("File::open: Trying to open a FilesystemNode which does not exist");
- return false;
- } else if (node.isDirectory()) {
+ if (node.isDirectory()) {
warning("File::open: Trying to open a FilesystemNode which is a directory");
return false;
} /*else if (!node.isReadable() && mode == kFileReadMode) {
@@ -511,7 +508,7 @@ bool DumpFile::open(const FilesystemNode &node) {
return false;
}*/
- _handle = fopen(node.getPath().c_str(), "rb");
+ _handle = fopen(node.getPath().c_str(), "wb");
if (_handle == NULL)
debug(2, "File %s not found", node.getName().c_str());