[Scummvm-cvs-logs] SF.net SVN: scummvm: [25912] scummvm/trunk/backends/fs/symbian/symbian-fs. cpp
anotherguest at users.sourceforge.net
anotherguest at users.sourceforge.net
Wed Feb 28 22:25:06 CET 2007
Revision: 25912
http://scummvm.svn.sourceforge.net/scummvm/?rev=25912&view=rev
Author: anotherguest
Date: 2007-02-28 13:25:05 -0800 (Wed, 28 Feb 2007)
Log Message:
-----------
Updated Symbian File handling to be able support AGI games, but do work due to a fluke in the AGI detection.
Modified Paths:
--------------
scummvm/trunk/backends/fs/symbian/symbian-fs.cpp
Modified: scummvm/trunk/backends/fs/symbian/symbian-fs.cpp
===================================================================
--- scummvm/trunk/backends/fs/symbian/symbian-fs.cpp 2007-02-28 18:25:42 UTC (rev 25911)
+++ scummvm/trunk/backends/fs/symbian/symbian-fs.cpp 2007-02-28 21:25:05 UTC (rev 25912)
@@ -70,7 +70,9 @@
}
AbstractFilesystemNode *AbstractFilesystemNode::getCurrentDirectory() {
- return AbstractFilesystemNode::getRoot();
+ char path[MAXPATHLEN];
+ getcwd(path, MAXPATHLEN);
+ return new SymbianFilesystemNode(path);
}
AbstractFilesystemNode *AbstractFilesystemNode::getRoot() {
@@ -97,16 +99,20 @@
_isPseudoRoot = false;
_path = path;
- const char *dsplName = NULL, *pos = path.c_str();
- // FIXME -- why is this code scanning for a slash '/' when the rest of
- // the code in this file uses backslashes '\' ?
- // TODO: Use lastPathComponent here.
- while (*pos)
- if (*pos++ == '/')
- dsplName = pos;
- _displayName = String(dsplName);
- _isValid = true;
- _isDirectory = true;
+ _displayName = lastPathComponent(_path);
+
+ TEntry fileAttribs;
+ TFileName fname;
+ TPtrC8 ptr((const unsigned char*)_path.c_str(),_path.size());
+ fname.Copy(ptr);
+
+ if (CEikonEnv::Static()->FsSession().Entry(fname, fileAttribs) == KErrNone) {
+ _isValid = true;
+ _isDirectory = fileAttribs.IsDir();
+ } else {
+ _isValid = false;
+ _isDirectory = false;
+ }
}
bool SymbianFilesystemNode::listDir(AbstractFSList &myList, ListMode mode) const {
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