[Scummvm-cvs-logs] CVS: scummvm/backends/fs/windows windows-fs.cpp,1.20,1.21

Torbjörn Andersson eriktorbjorn at users.sourceforge.net
Mon Nov 29 03:15:06 CET 2004


Update of /cvsroot/scummvm/scummvm/backends/fs/windows
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12128/windows

Modified Files:
	windows-fs.cpp 
Log Message:
Allow the file browser to get back to the "pseudo root" under Windows. This
fixes bug #1074919.


Index: windows-fs.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/fs/windows/windows-fs.cpp,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -d -r1.20 -r1.21
--- windows-fs.cpp	21 Nov 2004 13:18:07 -0000	1.20
+++ windows-fs.cpp	29 Nov 2004 11:14:12 -0000	1.21
@@ -102,7 +102,7 @@
 	entry._path += asciiName;
 	if (entry._isDirectory)
 		entry._path += "\\";
-	entry._isValid = true;	
+	entry._isValid = true;
 	entry._isPseudoRoot = false;
 
 	list.push_back(wrap(new WindowsFilesystemNode(&entry)));
@@ -197,8 +197,10 @@
 
 AbstractFilesystemNode *WindowsFilesystemNode::parent() const {
 	assert(_isValid || _isPseudoRoot);
-	WindowsFilesystemNode *p = 0;
-	if (!_isPseudoRoot && _path.size() > 3) {
+	if (_isPseudoRoot)
+		return 0;
+	WindowsFilesystemNode *p = new WindowsFilesystemNode();
+	if (_path.size() > 3) {
 		const char *start = _path.c_str();
 		const char *end = lastPathComponent(_path);
 





More information about the Scummvm-git-logs mailing list