Skip to content

Commit

Permalink
fix FENUM
Browse files Browse the repository at this point in the history
  • Loading branch information
steve02081504 committed Jun 14, 2022
1 parent cc6a675 commit f2ab2a1
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions sysfunc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3762,13 +3762,15 @@ CValue CSystemFunction::FENUM(CSF_FUNCPARAM &p)

CDirEnum ef(vm.basis().ToFullPath(p.arg.array()[0].GetValueString()));
CDirEnumEntry entry;
int count = 0;
CValue result(F_TAG_STRING,0);
size_t count = 0;
yaya::string_t result;

while ( ef.next(entry) ) {
if ( count ) { result.GetValueString() += delimiter; }
if ( entry.isdir ) { result.GetValueString() += L"\\"; }
result.GetValueString() += entry.name;
if(count)
result += delimiter;
if(entry.isdir)
result += L'\\';
result += entry.name;

count += 1;
}
Expand Down

0 comments on commit f2ab2a1

Please sign in to comment.