Skip to content

Commit

Permalink
Backport filesystem fixes from IX-Ray 1.6
Browse files Browse the repository at this point in the history
  • Loading branch information
acidicMercury8 committed Jul 28, 2023
1 parent 0b5119e commit f481ef1
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions src/xrCore/LocatorAPI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -486,16 +486,11 @@ bool CLocatorAPI::Recurse (const char* path)

_findclose ( hFile );

u32 count = rec_files.size();
_finddata_t *buffer = (_finddata_t*)_alloca(count*sizeof(_finddata_t));
std::copy (&*rec_files.begin(), &*rec_files.begin() + count, buffer);

//. std::copy (&*rec_files.begin(),&*rec_files.end(),buffer);

FFVec buffer(rec_files);
rec_files.clear();
std::sort (buffer, buffer + count, pred_str_ff);
for (_finddata_t *I = buffer, *E = buffer + count; I != E; ++I)
ProcessOne (path,I);
std::sort(buffer.begin(), buffer.end(), pred_str_ff);
for (FFIt I = buffer.begin(), E = buffer.end(); I != E; ++I)
ProcessOne(path, &*I);

// insert self
if (path&&path[0])\
Expand Down

0 comments on commit f481ef1

Please sign in to comment.