summaryrefslogtreecommitdiff
path: root/UCoreWorkers.pas
diff options
context:
space:
mode:
authorTomas Bzatek <tbzatek@redhat.com>2024-10-23 21:14:22 +0200
committerTomas Bzatek <tbzatek@redhat.com>2024-10-23 21:14:22 +0200
commit40a71ffb604413c41b429dbbe4dfaf4520a03061 (patch)
treeea2abc1839cca441e4242667c35acee461515033 /UCoreWorkers.pas
parentaf25c37af9cd3fd62b70ef2f238cbb900dd480e3 (diff)
downloadtuxcmd-40a71ffb604413c41b429dbbe4dfaf4520a03061.tar.xz
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
Diffstat (limited to 'UCoreWorkers.pas')
-rw-r--r--UCoreWorkers.pas6
1 files changed, 6 insertions, 0 deletions
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;