[Scummvm-cvs-logs] SF.net SVN: scummvm:[35894] scummvm/trunk/backends/fs/wii/wii-fs.cpp
dhewg at users.sourceforge.net
dhewg at users.sourceforge.net
Sun Jan 18 13:58:07 CET 2009
Revision: 35894
http://scummvm.svn.sourceforge.net/scummvm/?rev=35894&view=rev
Author: dhewg
Date: 2009-01-18 12:58:06 +0000 (Sun, 18 Jan 2009)
Log Message:
-----------
Removed slashes as last char from directories
Modified Paths:
--------------
scummvm/trunk/backends/fs/wii/wii-fs.cpp
Modified: scummvm/trunk/backends/fs/wii/wii-fs.cpp
===================================================================
--- scummvm/trunk/backends/fs/wii/wii-fs.cpp 2009-01-18 09:29:22 UTC (rev 35893)
+++ scummvm/trunk/backends/fs/wii/wii-fs.cpp 2009-01-18 12:58:06 UTC (rev 35894)
@@ -134,13 +134,14 @@
return;
}
- _path = p;
+ _path = Common::normalizePath(p, '/');
- if (_path.hasSuffix(":/"))
- _displayName = _path;
- else
- _displayName = lastPathComponent(_path, '/');
+ // "fat:" is not a valid directory, but "fat:/" is
+ if (_path.lastChar() == ':')
+ _path += '/';
+ _displayName = lastPathComponent(_path, '/');
+
struct stat st;
if (!stat(_path.c_str(), &st))
setFlags(&st);
@@ -154,13 +155,14 @@
return;
}
- _path = p;
+ _path = Common::normalizePath(p, '/');
- if (_path.hasSuffix(":/"))
- _displayName = _path;
- else
- _displayName = lastPathComponent(_path, '/');
+ // "fat:" is not a valid directory, but "fat:/" is
+ if (_path.lastChar() == ':')
+ _path += '/';
+ _displayName = lastPathComponent(_path, '/');
+
setFlags(st);
}
@@ -210,9 +212,6 @@
(mode == Common::FSNode::kListDirectoriesOnly && !isDir))
continue;
- if (isDir)
- newPath += '/';
-
list.push_back(new WiiFilesystemNode(newPath, &st));
}
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