[Scummvm-cvs-logs] SF.net SVN: scummvm: [22253] scummvm/trunk/backends/fs/windows/windows-fs.cpp
kirben at users.sourceforge.net
kirben at users.sourceforge.net
Mon May 1 01:26:03 CEST 2006
Revision: 22253
Author: kirben
Date: 2006-05-01 01:24:57 -0700 (Mon, 01 May 2006)
ViewCVS: http://svn.sourceforge.net/scummvm/?rev=22253&view=rev
Log Message:
-----------
Add windows code for AbstractFilesystemNode::child()
Modified Paths:
--------------
scummvm/trunk/backends/fs/windows/windows-fs.cpp
Modified: scummvm/trunk/backends/fs/windows/windows-fs.cpp
===================================================================
--- scummvm/trunk/backends/fs/windows/windows-fs.cpp 2006-05-01 00:25:41 UTC (rev 22252)
+++ scummvm/trunk/backends/fs/windows/windows-fs.cpp 2006-05-01 08:24:57 UTC (rev 22253)
@@ -230,7 +230,19 @@
}
AbstractFilesystemNode *WindowsFilesystemNode::child(const String &name) const {
- TODO
+ assert(_isDirectory);
+ String newPath(_path);
+ if (_path.lastChar() != '\\')
+ newPath += '\\';
+ newPath += name;
+
+ // Check whether the directory actually exists
+ DWORD fileAttribs = GetFileAttributes(toUnicode(newPath.c_str()));
+ if (fileAttribs == 0xffffffff)
+ return 0;
+
+ WindowsFilesystemNode *p = new WindowsFilesystemNode(newPath);
+ return p;
}
#endif // WIN32
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