You are not logged in.
Pages: 1
Hi AB,
I have been using TZipWrite to add multiple folders to a ZIP but their contents all get merged into the root of the ZIP file.
My solution was to add a 'ZipFolder' parameter to the procedure so you can specify a Foldername to use inside the ZIP file....
procedure TZipWrite.AddFolder(const FolderName: TFileName; const Mask: TFileName;
Recursive: boolean; CompressLevel: integer;
ZipFolder: TFileName = '');
..
..
begin
if ZipFolder <> '' then
ZipFolder:= IncludeTrailingPathDelimiter(ZipFolder);
result := RecursiveAdd(IncludeTrailingPathDelimiter(FolderName), ZipFolder);
end;
Tested with mORMot1. I see mORMot2 is a little different but functionally the same
Offline
Good idea.
Please try https://synopse.info/fossil/info/82039c7872 for mORMot 1
and https://github.com/synopse/mORMot2/commit/fd4afbcf for mORMot 2.
Thanks for the suggestion!
Offline
Pages: 1