411 |
|
end; |
412 |
|
end; |
413 |
|
SetLength(Result, list.Count); |
414 |
< |
fields := TStringList.Create; |
415 |
< |
if sort in [stIDAsc, stNameAsc, stExtAsc] then |
416 |
< |
for i := 0 to list.Count - 1 do |
417 |
< |
begin |
418 |
< |
getfields; |
419 |
< |
Result[i] := id + '-' + name + '.' + extension; |
420 |
< |
end |
421 |
< |
else |
422 |
< |
for i := list.Count - 1 downto 0 do |
423 |
< |
begin |
424 |
< |
getfields; |
425 |
< |
Result[list.Count - i - 1] := id + '-' + name + '.' + extension; |
426 |
< |
end; |
414 |
> |
if Length(Result) > 0 then |
415 |
> |
begin |
416 |
> |
fields := TStringList.Create; |
417 |
> |
if sort in [stIDAsc, stNameAsc, stExtAsc] then |
418 |
> |
for i := 0 to list.Count - 1 do |
419 |
> |
begin |
420 |
> |
getfields; |
421 |
> |
Result[i] := id + '-' + name + '.' + extension; |
422 |
> |
end |
423 |
> |
else |
424 |
> |
for i := list.Count - 1 downto 0 do |
425 |
> |
begin |
426 |
> |
getfields; |
427 |
> |
Result[list.Count - i - 1] := id + '-' + name + '.' + extension; |
428 |
> |
end; |
429 |
> |
fields.Free; |
430 |
> |
end; |
431 |
|
list.Free; |
428 |
– |
fields.Free; |
432 |
|
end; |
433 |
|
|
434 |
|
|