aboutsummaryrefslogtreecommitdiff
path: root/backends/saves/default
diff options
context:
space:
mode:
authorTorbjörn Andersson2008-11-21 20:02:55 +0000
committerTorbjörn Andersson2008-11-21 20:02:55 +0000
commit7a04c39fa8a695e72bbbdae687aabb7d7a8140ba (patch)
tree7c6deae67daea02f3931bf2dede3b63590418a11 /backends/saves/default
parent44d37a14a9bef80d2ca931298b8df1e508ffb94d (diff)
downloadscummvm-rg350-7a04c39fa8a695e72bbbdae687aabb7d7a8140ba.tar.gz
scummvm-rg350-7a04c39fa8a695e72bbbdae687aabb7d7a8140ba.tar.bz2
scummvm-rg350-7a04c39fa8a695e72bbbdae687aabb7d7a8140ba.zip
Since we don't have FSNode::lookupFile() any more, switch to using
FSDirectory::listMatchingMembers() instead. I hope the new code behaves close enough to the old one. svn-id: r35143
Diffstat (limited to 'backends/saves/default')
-rw-r--r--backends/saves/default/default-saves.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/backends/saves/default/default-saves.cpp b/backends/saves/default/default-saves.cpp
index c15463e7bb..871032754a 100644
--- a/backends/saves/default/default-saves.cpp
+++ b/backends/saves/default/default-saves.cpp
@@ -31,6 +31,7 @@
#include "common/savefile.h"
#include "common/util.h"
#include "common/fs.h"
+#include "common/archive.h"
#include "common/config-manager.h"
#include <errno.h> // for removeSavefile()
@@ -59,13 +60,14 @@ Common::StringList DefaultSaveFileManager::listSavefiles(const char *pattern) {
if (getError() != Common::kNoError)
return Common::StringList();
- Common::FSList savefiles;
+ Common::FSDirectory dir(savePath);
+ Common::ArchiveMemberList savefiles;
Common::StringList results;
Common::String search(pattern);
- if (savePath.lookupFile(savefiles, search, false, true, 0)) {
- for (Common::FSList::const_iterator file = savefiles.begin(); file != savefiles.end(); ++file) {
- results.push_back(file->getName());
+ if (dir.listMatchingMembers(savefiles, search) > 0) {
+ for (Common::ArchiveMemberList::const_iterator file = savefiles.begin(); file != savefiles.end(); ++file) {
+ results.push_back((*file)->getName());
}
}