[Scummvm-cvs-logs] SF.net SVN: scummvm:[33609] scummvm/trunk/common/file.cpp

fingolfin at users.sourceforge.net fingolfin at users.sourceforge.net
Mon Aug 4 15:25:32 CEST 2008


Revision: 33609
          http://scummvm.svn.sourceforge.net/scummvm/?rev=33609&view=rev
Author:   fingolfin
Date:     2008-08-04 13:25:30 +0000 (Mon, 04 Aug 2008)

Log Message:
-----------
Modified DumpFile::open to accept non-existing nodes, and to actually open files in write mode -- d'oh

Modified Paths:
--------------
    scummvm/trunk/common/file.cpp

Modified: scummvm/trunk/common/file.cpp
===================================================================
--- scummvm/trunk/common/file.cpp	2008-08-04 11:48:33 UTC (rev 33608)
+++ scummvm/trunk/common/file.cpp	2008-08-04 13:25:30 UTC (rev 33609)
@@ -497,10 +497,7 @@
 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 @@
 		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());


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list