Wauw... I found the "bug"

(my third bugfix-assist for fpspreadsheet in a week)
I tried to re-zip the files with this code to see if the order of the files within the zip would make a difference. But i
accidentally used forward slashes instead of backslashes (as is normal in Windows).
AND IT WORKED !! (I could read the file in LibreOffice)
procedure TForm1.Button3Click(Sender: TObject);
var
Zip: TZipper;
Ts: TStringList;
begin
SetCurrentDir('c:\temp\test\');
Ts := TStringList.Create;
Ts.Add('[Content_Types].xml');
Ts.Add('_rels/.rels');
Ts.Add('xl/_rels/workbook.xml.rels'); // <--- Oops... / = lucky typo ;)
Ts.Add('xl/workbook.xml');
Ts.Add('xl/styles.xml');
Ts.Add('xl/sharedStrings.xml');
Ts.Add('xl/worksheets/sheet1.xml');
Zip := TZipper.Create;
Zip.ZipFiles('c:\temp\test2.xlsx', Ts);
Zip.Free;
Ts.Free;
end;
Attached is the test.xlsx created by fpspreadsheet and a newly zipped test2.xlsx (zipped by zipper.pp).
If i scroll down in the files with a hexeditor and compare them you clearly see the only difference is the / and \.
The only file with slashes (and subdir) in an ODS-file is OPENDOC_PATH_METAINF_MANIFEST and that one is also defined with a
forward slash (/) regardless of OS. The OOXML_PATH_xxxx's in xlsxooxml.pas are defined with the PathDelim (from sysutilh.inc) which is the system-delimiter. (Which is the backslash on Windows)
So LibreOffice has a problem with files zipped with backslahes (internally within the zip).
7-zip also zips files with forward slashes (that's why rezipping with 7-zip worked).
Is it a
standard that all zip-files should have
forward slashes as delimiter????
If so, then the Path variables (OOXML_PATH_xxxx) in xlsxooxml.pas are wrong.
Edit: Yeah... The OOXML_PATH_xxxx's should be adjusted with /.
(Or even better: the zipper-unit should replace the \ with /)
.ZIP File Format Specification4.4.17 file name: (Variable)
4.4.17.1 The name of the file, with optional relative path.
The path stored MUST not contain a drive or device letter, or a leading slash. All slashes MUST be forward slashes '/' as opposed to backwards slashes '\' for compatibility with Amiga and UNIX file systems etc.
(source:
http://www.pkware.com/documents/casestudies/APPNOTE.TXT)