I found some bugs in the procedure "AddFileToRootIsoItem" , the subItem should first evaluate null string then make it point to the nextItem , or all the fileNames in the subDirectories except the last one will be assigned null string.
And "." and ".." should be filtered.
if (sr.Name <> '.') and (sr.Name <> '..') and then
begin
if Assigned(SubDirItem) then
begin
SubDirItem.nextItem := NeroCreateIsoItem();
//Exchanged the sequence 2 lines below
SubDirItem := SubDirItem.nextItem;
SubDirItem.fileName := '';
end
else
begin
SubDirItem := NeroCreateIsoItem();
SubDirItem.fileName := '';
TempItem.subDirFirstItem := SubDirItem;
end;
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I found some bugs in the procedure "AddFileToRootIsoItem" , the subItem should first evaluate null string then make it point to the nextItem , or all the fileNames in the subDirectories except the last one will be assigned null string.
And "." and ".." should be filtered.
if (sr.Name <> '.') and (sr.Name <> '..') and then
begin
if Assigned(SubDirItem) then
begin
SubDirItem.nextItem := NeroCreateIsoItem();
//Exchanged the sequence 2 lines below
SubDirItem := SubDirItem.nextItem;
SubDirItem.fileName := '';
end
else
begin
SubDirItem := NeroCreateIsoItem();
SubDirItem.fileName := '';
TempItem.subDirFirstItem := SubDirItem;
end;