Hi Nigel,
I solved the problem.
The mistake is in following procedure unit IexFolderMView.pas:
By inserting "if not IO.Aborting then" see arrow the procedure works perfectly.
Old:
function TImageEnFolderMView.GetFolders(ssDest: TStrings; CallOnProgress: Boolean = False): integer;
procedure _AddSubFolders(Folder: string);
var
DirName : WideString;
dir: TIEDirContent;
sNewFolder: String;
begin
Folder := IEAddBackSlash( Folder );
dir := TIEDirContent.Create( Folder + '*.*' );
try
while dir.GetItem( DirName, False, True, fShowHiddenFiles ) do
begin
// Show progress so user can abort using MIO.Aborting := True;
if assigned( OnIOProgress ) then
OnIOProgress( Self, 0 );
sNewFolder := IEAddBackSlash( Folder + DirName );
if ssDest.IndexOf( sNewFolder ) = -1 then
begin
ssDest.Add( sNewFolder );
_AddSubFolders( sNewFolder );
if CallOnProgress and assigned( OnProgress ) then
TIEProgressEvent(OnProgress)( Self, 0 );
end;
end;
finally
dir.Free;
end;
end;
---------------------
New:
// Return a list of all folders in the "Folder" property and optionally their sub-folders if "IncludeSubFolders" is enabled
function TImageEnFolderMView.GetFolders(ssDest: TStrings; CallOnProgress: Boolean = False): integer;
procedure _AddSubFolders(Folder: string);
var
DirName : WideString;
dir: TIEDirContent;
sNewFolder: String;
begin
Folder := IEAddBackSlash( Folder );
dir := TIEDirContent.Create( Folder + '*.*' );
try
while dir.GetItem( DirName, False, True, fShowHiddenFiles ) do
begin
// Show progress so user can abort using MIO.Aborting := True;
if assigned( OnIOProgress ) then
OnIOProgress( Self, 0 );
sNewFolder := IEAddBackSlash( Folder + DirName );
-->> if not MIO.Aborting then
if ssDest.IndexOf( sNewFolder ) = -1 then
begin
ssDest.Add( sNewFolder );
_AddSubFolders( sNewFolder );
if CallOnProgress and assigned( OnProgress ) then
TIEProgressEvent(OnProgress)( Self, 0 );
end;
end;
finally
dir.Free;
end;
end;
Klaus
www.klausdoege.de