Hello!
It seems I've found a bug that doesn't allow to pack into zip archive the files with unicode filenames (at least on windows).
Looking through the Abbrevia(5.2) code I got to the "bottleneck" GetFileAttributesEx windows function which, as I tested further, - returns an error if a file with unicode filename is passed into as parameter.
According to the GetFileAttributesEx function specification(MSDN) this function should be replaced with
GetFileAttributesExW (for Unicode) and GetFileAttributesExA (for ANSI).
So, here is a patched working code (small changes to AbUtils.pas, function AbFileGetAttrEx, line 1283):
function AbFileGetAttrEx ...
...
begin
...
{$IFDEF MSWINDOWS}
//Result := GetFileAttributesEx(PChar(aFileName), GetFileExInfoStandard, @FindData);
Result := GetFileAttributesExW(PWideChar(UnicodeString(aFileName)), GetFileExInfoStandard, @FindData);
...
Bug found and solution tested on Windows 7, LAZARUS(#1.6), Abbrevia 5.2.
Dear Abbrevia team!
Another small bug is that an attempt to UNZIP archive with files (with hidden attribute), which overwrite the same existing files(with hidden attr), causes "ecFileOpenError" errors. It seems a little bit strange - popular Zip/unzip programs are able to do it. Didn't dig out the thuth, just think that it's not a matter of file/program/user permissions.
Didn't post it as a ticket because it's not that serious bug, but it's a minor annoyance.
Best regards,
Gregory Striizh
Last edit: Gregory 2016-06-21