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

fingolfin at users.sourceforge.net fingolfin at users.sourceforge.net
Wed Apr 26 01:14:16 CEST 2006


Revision: 22170
Author:   fingolfin
Date:     2006-04-26 01:13:25 -0700 (Wed, 26 Apr 2006)
ViewCVS:  http://svn.sourceforge.net/scummvm/?rev=22170&view=rev

Log Message:
-----------
Commited *correct* File::exists reimplementation (compared to my incomplete previous commit. Aargh)

Modified Paths:
--------------
    scummvm/trunk/common/file.cpp
Modified: scummvm/trunk/common/file.cpp
===================================================================
--- scummvm/trunk/common/file.cpp	2006-04-26 08:05:40 UTC (rev 22169)
+++ scummvm/trunk/common/file.cpp	2006-04-26 08:13:25 UTC (rev 22170)
@@ -263,9 +263,8 @@
 }
 
 bool File::exists(const String &filename) {
-	// FIXME: Ugly ugly hack!
-	File tmp;
-	return tmp.open(filename, kFileReadMode);
+	FilesystemNode file(filename);
+	return (file.isValid() && !file.isDirectory());
 }
 
 void File::close() {


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