Fixed Invalid add-on zip files from add-on builder

Fixed by editing XF/Service/AddOn/ReleaseBuilder with
$localName = substr($file->getPathname(), strlen($this->buildRoot));
$localName = substr($file->getPathname(), strlen($this->buildRoot) + 1);

This removes the leading \ (well /)
This problem doesn’t appear to affect macOS using The Unarchived, as I generated & unzipped a few Addons yesterday after upgrading to 2.0.10.

Just had a user that is using Windows 10 report an empty zip file that was compiled today with XF 2.0.10.

It's fine with Linux and Windows 7.

I applied the fix @Xon suggested and am waiting for feedback if it works for the user.
Last edited:
And I can confirm the fix @Xon suggested works. The user that had the problem reports that all is fine after downloading the zip created with the patched ReleaseBuilder file. And I'm still able to unzip it in Linux without a problem.
I've applied the fix from above to my installation and packaged up the add-ons once more. They look fine in my windows installation, but my colleagues report them broken still when extracting them on Mac. If the fix from above is the one that got implemented, you probably want to look into it once more.
I need to do some further testing, but this should sort it:
$localName = str_replace('\\', '/', substr($file->getPathname(), strlen($this->buildRoot) + 1));
The directory separator in the world of Zip files should always be / but the path name will use \ on Windows.
Top Bottom