[Scummvm-cvs-logs] SF.net SVN: scummvm: [25203] scummvm/trunk/engines/scumm/plugin.cpp
fingolfin at users.sourceforge.net
fingolfin at users.sourceforge.net
Fri Jan 26 18:15:12 CET 2007
Revision: 25203
http://scummvm.svn.sourceforge.net/scummvm/?rev=25203&view=rev
Author: fingolfin
Date: 2007-01-26 09:15:12 -0800 (Fri, 26 Jan 2007)
Log Message:
-----------
Don't convert FSNode to a path when we don't have to
Modified Paths:
--------------
scummvm/trunk/engines/scumm/plugin.cpp
Modified: scummvm/trunk/engines/scumm/plugin.cpp
===================================================================
--- scummvm/trunk/engines/scumm/plugin.cpp 2007-01-26 17:04:19 UTC (rev 25202)
+++ scummvm/trunk/engines/scumm/plugin.cpp 2007-01-26 17:15:12 UTC (rev 25203)
@@ -965,7 +965,7 @@
}
struct DetectorDesc {
- Common::String path;
+ FilesystemNode node;
Common::String md5;
uint8 md5sum[16];
const MD5Table *md5Entry; // Entry of the md5 table corresponding to this file, if any.
@@ -983,7 +983,7 @@
for (FSList::const_iterator file = fslist.begin(); file != fslist.end(); ++file) {
if (!file->isDirectory()) {
DetectorDesc d;
- d.path = file->path();
+ d.node = *file;
d.md5Entry = 0;
fileMD5Map[file->name()] = d;
}
@@ -1031,7 +1031,7 @@
DetectorDesc &d = fileMD5Map[file];
if (d.md5.empty()) {
uint8 md5sum[16];
- if (Common::md5_file(d.path.c_str(), md5sum, kMD5FileSizeLimit)) {
+ if (Common::md5_file(d.node, md5sum, kMD5FileSizeLimit)) {
char md5str[32+1];
for (int j = 0; j < 16; j++) {
sprintf(md5str + j*2, "%02x", (int)md5sum[j]);
@@ -1150,8 +1150,8 @@
// try to filter out some cases.
Common::File tmp;
- if (!tmp.open(d.path.c_str())) {
- warning("SCUMM detectGames: failed to open '%s' for read access", d.path.c_str());
+ if (!tmp.open(d.node)) {
+ warning("SCUMM detectGames: failed to open '%s' for read access", d.node.path().c_str());
return false;
}
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