Zip install should cope with version files and files zipped at folder level
|Reported by:||anmari||Owned by:|
Currently if someone zips a plugin at the folder level and the recipient of the zip file uses the zip install option, the plugin will get installed a layer too deep and activation fails with an 'invalid headers' message.
The unzip process should check whether there are folders, but no files (allowing multiple would allow multiple plugins in one go) If no files, then assume that the folders are plugin folders and insert them direct into the plugins folder.
ONLY If there are files not just a folder, then create the plugin folder using the zip file name (unless someone can think of another way to work out whether the zip file has version numbers or not.
Ideally one should safely be able to name zip files with version numbers for better tracking of versions of a plugin. eg:
pluginame folder OR 1 file pluginname.php
and would get unzipped to exactly that within the plugin folder.
Current functioning would unzip and install to a folder called
pluginame1.1 and if the recipent got a plugin update and zip installed that, it would create another folder
and attempt to activate a second instance of the plugin.
Personally I always use ftp, but there are more and more people using wordpress who are unfamiliar with ftp. The Zip installer should be more robust so they struggle less.