summaryrefslogtreecommitdiffhomepage
path: root/StarsEx/DataLoader.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'StarsEx/DataLoader.cpp')
-rw-r--r--StarsEx/DataLoader.cpp12
1 files changed, 3 insertions, 9 deletions
diff --git a/StarsEx/DataLoader.cpp b/StarsEx/DataLoader.cpp
index 95e8444..2ef84c3 100644
--- a/StarsEx/DataLoader.cpp
+++ b/StarsEx/DataLoader.cpp
@@ -224,9 +224,7 @@ DataLoader::FindFile(const char* name)
// first check current directory:
if (work_directory_source) {
- work_directory_source->SetPrefix(datapath);
- bool found = work_directory_source->Find(name);
- work_directory_source->SetPrefix();
+ bool found = work_directory_source->Find(datapath, name);
if (found)
return true;
}
@@ -335,9 +333,7 @@ void
DataLoader::ListFileSystem(const char* filter, List<Text>& list, Text base_path, bool recurse)
{
if (work_directory_source) {
- work_directory_source->SetPrefix(base_path);
- work_directory_source->ListFiles(filter, list, recurse);
- work_directory_source->SetPrefix();
+ work_directory_source->ListFiles(base_path, filter, list, recurse);
}
}
@@ -354,9 +350,7 @@ DataLoader::LoadBuffer(const char* name, BYTE*& buf, bool null_terminate, bool o
strcat_s(filename, name);
if (work_directory_source) {
- work_directory_source->SetPrefix(datapath);
- int len = work_directory_source->Load(name, buf, null_terminate);
- work_directory_source->SetPrefix();
+ int len = work_directory_source->Load(datapath, name, buf, null_terminate);
if (len > 0)
return len;
if (buf)