Index: oup/current/DataAccess/Access_OUP_ADB.pas
===================================================================
--- oup/current/DataAccess/Access_OUP_ADB.pas	(revision 155)
+++ oup/current/DataAccess/Access_OUP_ADB.pas	(revision 156)
@@ -47,5 +47,5 @@
 
 uses
-  SysUtils, Data, Functions, ABSDecUtil, DB, DatLinks;
+  SysUtils, Data, Functions, ABSDecUtil, DB, DatLinks, StrUtils;
 
 
@@ -214,4 +214,37 @@
 
 
+  function CompareItems(List: TStringList; I1, I2: Integer): Integer;
+  var
+    fin: Boolean;
+    pos: Integer;
+    s1, s2: String;
+  begin
+    fin := False;
+    s1 := MidStr(List[I1], 1, PosEx(';', List[I1], 6) - 1);
+    s2 := MidStr(List[I2], 1, PosEx(';', List[I2], 6) - 1);
+    pos := 1;
+    Result := 0;
+    repeat
+      if Ord(s1[pos]) < Ord(s2[pos]) then
+      begin
+        Result := -1;
+        fin := True;
+      end
+      else if Ord(s1[pos]) > Ord(s2[pos]) then
+      begin
+        Result := 1;
+        fin := True;
+      end;
+      Inc(pos);
+    until fin or (pos > Length(s1)) or (pos > Length(s2));
+
+    if not fin then
+    begin
+      if pos > Length(s1) then
+        Result := -1
+      else
+        Result := 1;
+    end;
+  end;
 
 function TAccess_OUP_ADB.GetFilesList(ext: String; pattern: String;
@@ -254,6 +287,8 @@
 begin
   list := TStringList.Create;
-  list.CaseSensitive := True;
-  list.Sorted := True;
+  if SortType in [ST_ExtNameAsc, ST_ExtNameDesc] then
+    list.Sorted := False
+  else
+    list.Sorted := True;
   for i := 0 to GetFileCount - 1 do
   begin
@@ -277,4 +312,6 @@
     end;
   end;
+  if SortType in [ST_ExtNameAsc, ST_ExtNameDesc] then
+    list.CustomSort(CompareItems);
   if not Assigned(Result) then
     Result := TStringList.Create;
