From 40a71ffb604413c41b429dbbe4dfaf4520a03061 Mon Sep 17 00:00:00 2001 From: Tomas Bzatek Date: Wed, 23 Oct 2024 21:14:22 +0200 Subject: Sort global filelist in case of a streaming type archive Before this change sorting was done on each panel item separately. Streaming type archives (e.g. tar) needs strict sequential order as indicated by the inode_no and the global filelist to copy needs to be sorted once more. Tested on 7z2301-extra.7z --- UCoreWorkers.pas | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'UCoreWorkers.pas') diff --git a/UCoreWorkers.pas b/UCoreWorkers.pas index 6ea4268..507e2b7 100644 --- a/UCoreWorkers.pas +++ b/UCoreWorkers.pas @@ -1501,6 +1501,12 @@ begin { if DestEngine.ChangeDir(CurrPath) <> 0 then DebugMsg(['*** WARNING: Cannot change to the origin location, strange behaviour may occur.']); if SrcEngine.ChangeDir(CurrPath) <> 0 then DebugMsg(['*** WARNING: Cannot change to the origin location, strange behaviour may occur.']); } + + // For streaming type archives the list of files to copy strictly needs to be sorted globally according to inode_no + if (SrcEngine is TVFSEngine) and (SrcEngine as TVFSEngine).ArchiveMode and (SrcEngine as TVFSEngine).ArchiveStreamingType then begin + DebugMsg(['Archive type is streaming, performing global filelist sort...']); + FillDirFiles_sort(List); + end; DebugWriteListSL(List); SkipInaccessible := False; -- cgit v1.2.3