"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "list_utils.pas" between
peazip-7.9.0.src.zip and peazip-8.0.0.src.zip

About: PeaZip is an OS-portable graphical file archiver, acting as frontend for various open source archiving utilities (incl. its native Pea archive format).

list_utils.pas  (peazip-7.9.0.src):list_utils.pas  (peazip-8.0.0.src)
skipping to change at line 116 skipping to change at line 116
.cramfs compressed ROM/RAM file system .cramfs compressed ROM/RAM file system
.ext, .ext2, .ext3, and .ext4 filesystem images .ext, .ext2, .ext3, and .ext4 filesystem images
.hfsx filesystem images .hfsx filesystem images
.qcow, and .qcow2c QEMU disk images .qcow, and .qcow2c QEMU disk images
.scap, and .uefif firmware files .scap, and .uefif firmware files
.mub, .pkg, and .ppmd compressed files .mub, .pkg, and .ppmd compressed files
0.54 20201230 G.Tani Added support for .appxbundle format, 211 extens ions supported 0.54 20201230 G.Tani Added support for .appxbundle format, 211 extens ions supported
Improved recognition of temp and other system's paths Improved recognition of temp and other system's paths
0.55 20210123 G.Tani Improved handling of special characters in passw ords and filenames 0.55 20210123 G.Tani Improved handling of special characters in passw ords and filenames
0.56 20210224 G.Tani Improved checkfilename function 0.56 20210224 G.Tani Improved checkfilename function
0.57 20210509 G.Tani Added support for .xappx, .3mf, .vsdx, .mmzx, .a
asx, .slx, ad .scdoc files, 218 extensions supported
Reorganized extensions codes in textext function
: 0..99 traditional archives 100..499 containers 500..599 containers that are us
ually not expected to be handled as archives 1000+archive types handled (for bro
wsing) through separate backends
(C) Copyright 2006 Giorgio Tani giorgio.tani.software@gmail.com (C) Copyright 2006 Giorgio Tani giorgio.tani.software@gmail.com
The program is released under GNU LGPL http://www.gnu.org/licenses/lgpl.txt The program is released under GNU LGPL http://www.gnu.org/licenses/lgpl.txt
This library is free software; you can redistribute it and/or This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either License as published by the Free Software Foundation; either
version 3 of the License, or (at your option) any later version. version 3 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful, This library is distributed in the hope that it will be useful,
skipping to change at line 750 skipping to change at line 752
until findnext(r) <> 0; until findnext(r) <> 0;
except except
FindClose(r); FindClose(r);
result:=false; result:=false;
exit; exit;
end; end;
FindClose(r); FindClose(r);
end; end;
end; end;
{function movecontent_todir(d1,d2:ansistring; mode:integer):integer; //input, ou
tput, mode 0:keep input dir 1:delete input dir if empty
//results -1 copy error (only exceptions), 0 success, 1 remove input dir error
var
r:TSearchRec;
begin
Result:=-1;
if (FindFirst(d1 + '*', faAnyFile, r) = 0) then
try
repeat
{$IFNDEF MSWINDOWS}
if FileExists(d2+r.name) then break;
{$ENDIF}
if (r.Name <> '.') and (r.Name <> '..') then
renamefile(d1+r.name, d2+r.name);
until findnext(r) <> 0;
except
FindClose(r);
exit;
end;
FindClose(r);
Result:=0;
if mode=1 then
if checkempty_dir(d1)= true then
try
if removedir(d1)=true then else Result:=1;
except
Result:=1;
end
else Result:=1;
end;}
function movecontent_todir(d1,d2:ansistring; mode:integer):integer; //input, out put, mode 0:keep input dir 1:delete input dir if empty function movecontent_todir(d1,d2:ansistring; mode:integer):integer; //input, out put, mode 0:keep input dir 1:delete input dir if empty
//results -1 copy error, 0 success, 1 remove input dir error //results -1 copy error, 0 success, 1 remove input dir error
var var
r:TSearchRec; r:TSearchRec;
begin begin
Result:=-1; Result:=-1;
if (FindFirst(d1 + '*', faAnyFile, r) = 0) then //scan for naming conflicts if (FindFirst(d1 + '*', faAnyFile, r) = 0) then //scan for naming conflicts
try try
repeat repeat
if (r.Name <> '.') and (r.Name <> '..') then if (r.Name <> '.') and (r.Name <> '..') then
skipping to change at line 2018 skipping to change at line 1989
{$ENDIF} {$ENDIF}
function testext(s: ansistring): integer; function testext(s: ansistring): integer;
var var
ext: ansistring; ext: ansistring;
begin begin
testext := -1; testext := -1;
ext := lowercase(extractfileext(s)); ext := lowercase(extractfileext(s));
//file types supported through 7z backend //file types supported through 7z backend
case ext of case ext of
//trditioanl archive types 0..99
'.7z', '.cb7': testext := 0; '.7z', '.cb7': testext := 0;
'.bz', '.bz2', '.bzip2', '.bzip', '.tbz2', '.tbz', '.tbzip2', '.tbzip', '.tb 2': testext := 1; '.bz', '.bz2', '.bzip2', '.bzip', '.tbz2', '.tbz', '.tbzip2', '.tbzip', '.tb 2': testext := 1;
'.gz', '.gzip', '.tgz', '.tpz', '.cpgz' : testext := 2; '.gz', '.gzip', '.tgz', '.tpz', '.cpgz' : testext := 2;
'.tar', '.cbt': testext := 5; '.tar', '.cbt': testext := 5;
'.zip', '.cbz', '.smzip', '.ppmd': testext := 6; '.zip', '.cbz', '.smzip', '.ppmd': testext := 6;
'.arj': testext := 7; '.arj': testext := 7;
'.cab', '.imf': testext := 8; //cab and derived formats
'.chm', '.chi', '.chq', '.chw', '.hxs', '.hxi', '.hxr', '.hxq', '.hxw', '.li
t': testext := 9;
'.cpio': testext := 10; '.cpio': testext := 10;
'.deb': testext := 11;
'.lzh': testext := 12; '.lzh': testext := 12;
'.rar', '.cbr', '.r00', '.r01': testext := 13; '.rar', '.cbr', '.r00', '.r01': testext := 13;
'.00': '.00':
begin begin
cutextension(s); cutextension(s);
if lowercase(extractfileext(s)) = '.rar' then if lowercase(extractfileext(s)) = '.rar' then
testext := 13; testext := 13;
end;//.rar.00 end;//.rar.00
'.rpm': testext := 14; '.z', '.taz', '.tz': testext := 14;
'.z', '.taz', '.tz': testext := 16; '.zipx': testext := 15;//non-legacy WinZip archives (supported for reading a
'.iso': testext := 19; s for 7z 9.22)
'.jar', '.ear', '.sar', '.war', '.apk': testext := 20;//Java and Android pac '.xz', '.txz': testext := 16;
kage (.zip derived) '.lha': testext := 17;
'.lha': testext := 21; '.wim', '.swm': testext := 18;//MS WIM Windows image file, SWM Split WIM ima
'.pet', '.pup': testext := 22;//PuppyLinux packages ge file
'.pak', '.pk3', '.pk4', '.iwd': testext := 23; //package format used in Quak '.lzma86', '.lzma': testext := 19;
e3 (pk3) and Quake 4 and Doom3 (pk4), zip with checksum appended '.part1', '.split': testext := 20; //generic spanned archive, open with 7z b
'.slp': testext := 24;//Stampede Linux packages inary
'': if extractfilename(s) = '[Content]' then testext := 25;//in case of [Con
tent] filename as when extracting RPM or SLP files //container types 100..499
'.xpi': testext := 26;//Mozilla installer package '.cab', '.imf': testext := 100; //cab and derived formats
'.wim', '.swm': testext := 27;//WIM Windows image file, SWM Split WIM image '.chm', '.chi', '.chq', '.chw', '.hxs', '.hxi', '.hxr', '.hxq', '.hxw', '.li
file t': testext := 101;
'.u3p': testext := 28;//U3P portable application package '.swf', '.fla': testext := 102; //Adobe Flash projects
'.lzma86', '.lzma': testext := 29; '.air': testext := 103; // Adobe Integrated Runtime
'.udf': testext := 30; '.xpi',//Mozilla installer package
'.xar', '.pkg': testext := 31; '.maff': testext := 104; //Mozilla web archive
'.dmg': testext := 32; '.pcv': testext := 105; //Thunderbird profile MozBackup
'.hfs', '.hfsx': testext := 33; '.crx': testext := 106; //Chrome extension
'.part1', '.split': testext := 34; //generic spanned archive, open with 7z b '.pak', '.pk3', '.pk4', '.iwd': testext := 107; //package format used in Qua
inary ke3 (pk3) and Quake 4 and Doom3 (pk4), zip with checksum appended
'.gpt': testext := 35; //GPT GUID Partition Table file '': if extractfilename(s) = '[Content]' then testext := 108;//in case of [Co
'.zipx': testext := 36;//non-legacy WinZip archives (supported for reading a ntent] filename as when extracting RPM or SLP files
s for 7z 9.22) '.u3p': testext := 109;//U3P portable application package
'.kmz': testext := 37; '.xar', '.pkg': testext := 110;
'.xz', '.txz': testext := 38; '.kmz': testext := 111;
'.vhd': testext := 39;//Microsoft Virtual PC Virtual Hard Disk '.mslz': testext := 112;
'.mslz': testext := 40; '.bsz': testext := 113;
'.apm': testext := 41; //Apple Partition Map disk images '.rmskin': testext := 114;
'.ipa', '.ipsw': testext := 42; //.ipa iPhone application archive file .ipsw '.wal', '.wsz': testext := 115;
iOS devices firmware packages (.zip variants) '.wmz': testext := 116; //compressed Windows Media Player file
'.bsz': testext := 43; '.xip': testext := 117;//Apple signed zip files
'.rmskin': testext := 44; '.mub': testext := 118; //mub compressed files
'.pcv': testext := 45; //Thunderbird profile MozBackup '.dmg': testext := 119;
'.wal', '.wsz': testext := 46; '.deb': testext := 120;
'.wmz': testext := 47; //compressed Windows Media Player file '.rpm': testext := 121;
'.air': testext := 48; // Adobe Integrated Runtime '.pet', '.pup': testext := 122;//PuppyLinux packages
'.ima', '.img': testext := 49; '.slp': testext := 123;//Stampede Linux packages
'.imz': testext := 50; '.ipa', '.ipsw': testext := 124; //.ipa iPhone application archive file .ips
'.mdf': testext := 51; //Alchool 120 image file w iOS devices firmware packages (.zip variants)
'.crx': testext := 52; //Chrome extension '.jar', '.ear', '.sar', '.war', '.apk', '.xapk': testext := 125;//Java and A
'.appx', '.appxbundle', '.appv', '.smpk', '.nupkg': testext := 53;//OPC file ndroid package (.zip derived)
s treated as archives '.xzm': testext := 126;//Porteus Linux packages
'.xzm': testext := 54;//Porteus Linux packages '.mlc', '.mui': testext := 127;//Microsoft's Language Interface Pack and Mul
'.mlc', '.mui': testext := 55;//Microsoft's Language Interface Pack and Mult tilingua User Interface packages
ilingua User Interface packages '.appx', '.appxbundle', '.appv', '.smpk', '.nupkg',
'.qcow', '.qcow2', '.qcow2c': testext := 56;//QUEMU image file '.dwfx', '.familyx', '.fdix', '.semblio', '.vsix', '.cspkg', '.scdoc',
'.vmdk': testext := 57;//VMware Virtual Machine Disk '.xps', '.oxps', '.jtx', '.cddx', '.3mf', '.vsdx', '.mmzx', '.aasx', '.slx':
'.vdi': testext := 58;//Oracle VirtualBox Virtual Drive Image testext := 128;//OPC files treated as archives
'.xip': testext := 59;//Apple signed zip files '.msix','.esd': testext := 129;//Microsoft MSIX app packages and ESD images
'.msix','.esd': testext := 60;//Microsoft MSIX app packages and ESD images '.snap': testext := 130;//Canonical Ubuntu Snap packages
'.snap': testext := 61;//Canonical Ubuntu Snap packages '.appimage': testext := 131;//AppImage packages
'.appimage': testext := 62;//AppImage packages '.ipk': testext := 132; //Freedesktop's Listaller .ipk packages
'.ipk': testext := 63; //Freedesktop's Listaller .ipk packages '.iso': testext := 133;
'.mub': testext := 64; //mub compressed files '.udf': testext := 134;
//mbr and filesystems that can be browsed by 7z backend '.hfs', '.hfsx': testext := 135;
'.mbr': testext := 100; '.vhd': testext := 136;//Microsoft Virtual PC Virtual Hard Disk
'.fat': testext := 101; '.apm': testext := 137; //Apple Partition Map disk images
'.ntfs': testext := 102; '.ima', '.img': testext := 138;
'.sfs': testext := 103; '.imz': testext := 139;
'.image': testext := 104; '.mdf': testext := 140; //Alchool 120 image file
'.squashfs': testext := 105; '.gpt': testext := 150; //GPT GUID Partition Table file
'.cramfs': testext := 106; '.qcow', '.qcow2', '.qcow2c': testext := 151;//QUEMU image file
'.ext', '.ext2', '.ext3', '.ext4': testext := 107; '.vmdk': testext := 152;//VMware Virtual Machine Disk
'.scap', '.uefif': testext := 108; '.vdi': testext := 153;//Oracle VirtualBox Virtual Drive Image
//(500 to 503) file types usually not handled as archives, can be supported '.mbr': testext := 154;
through 7z backend '.fat': testext := 155;
'.ntfs': testext := 156;
'.sfs': testext := 157;
'.image': testext := 158;
'.squashfs': testext := 159;
'.cramfs': testext := 160;
'.ext', '.ext2', '.ext3', '.ext4': testext := 161;
'.scap', '.uefif': testext := 162;
//file types usually not handled as archives, can be supported through 7z ba
ckend 500..599
'.exe', '.dll', '.sys': testext := 500; //most executables can be opened '.exe', '.dll', '.sys': testext := 500; //most executables can be opened
'.msi', '.msp', '.msu': testext := 500; '.msi', '.msp', '.msu': testext := 500;
'.sxc', '.sxd', '.sxi', '.sxw', '.stc', '.std', '.sti', '.stw', '.sxg', '.sx m': testext := 501; //OOo 1.x legacy filetypes '.sxc', '.sxd', '.sxi', '.sxw', '.stc', '.std', '.sti', '.stw', '.sxg', '.sx m': testext := 501; //OOo 1.x legacy filetypes
'.ods', '.ots', '.odm', '.oth', '.oxt', '.odb', '.odf', '.odg', '.otg', '.od p', '.otp', '.odt', '.ott': testext := 501; //OOo filetypes '.ods', '.ots', '.odm', '.oth', '.oxt', '.odb', '.odf', '.odg', '.otg', '.od p', '.otp', '.odt', '.ott': testext := 501; //OOo filetypes
'.gnm': testext := 501; //Gnumeric spreadsheet '.gnm': testext := 501; //Gnumeric spreadsheet
'.doc', '.dot', '.xls', '.xlt', '.ppt', '.pps', '.pot': testext := 502; //no n executable COMPOUND files '.doc', '.dot', '.xls', '.xlt', '.ppt', '.pps', '.pot': testext := 502; //no n executable COMPOUND files
'.docx', '.dotx', '.xlsx', '.xltx', '.pptx': testext := 502; //OPC MS Office 2007 compressed formats, treated as othes MS Office formats '.docx', '.dotx', '.xlsx', '.xltx', '.pptx': testext := 502; //OPC MS Office 2007 compressed formats, treated as othes MS Office formats
'.mpp': testext := 502; //misc MS formats '.mpp': testext := 502; //misc MS formats
//any other format to be handled primarily as non-archive: //misc formats to be handled primarily as non-archive:
//misc '.flv', //flash videos
'.swf', '.fla', '.flv', '.epub', //EPUB ebook (.zip variant)
//EPUB ebook (.zip variant) '.man': testext := 503; //compressed Unix/Linux man files
'.epub',
//Mozilla web archive
'.maff',
//compressed Unix/Linux man files
'.man',
//other Open Packaging Conventions filetypes
'.dwfx', '.familyx', '.fdix', '.semblio', '.vsix', '.cspkg',
'.xps', '.oxps', '.jtx', '.cddx': testext := 503;
//files supported through other backends //files supported through other backends
'.quad': testext := 1001; '.quad': testext := 1001;
'.balz': testext := 1002; '.balz': testext := 1002;
'.bcm': testext := 1003; '.bcm': testext := 1003;
'.zpaq': testext := 2000; '.zpaq': testext := 2000;
'.paq8f': testext := 2001; '.paq8f': testext := 2001;
'.paq8jd': testext := 2002; '.paq8jd': testext := 2002;
'.paq8l': testext := 2003; '.paq8l': testext := 2003;
'.paq8o': testext := 2004; '.paq8o': testext := 2004;
'.lpaq1': testext := 2501; '.lpaq1': testext := 2501;
 End of changes. 7 change blocks. 
117 lines changed or deleted 91 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)