Fontello has it's files an extra level deep, but icomoon's json file is right at the root of the archive.
i.e.
- fontello: archive_name.zip/archive_name/config.json
- iconmoon: archive_name.zip/selection.json
Changed: icon_archive_extract to check if there's more then one file then assume that we are already at the right level in the Archive, if there's there's only one level in the archive then then use that one directory as the sub_directory.
$files = $archiver->listContents();
//check if the files are nested a layer deep in the archive
if (count($files) > 1) {
$sub_directory = '';
$extract_location = $directory;
} else {
$sub_directory = strtok($files[0], '/\\');
$extract_location = $directory. '/' . $sub_directory;
}
Comments
Comment #1
dustin@pi commentedComment #2
markhalliwellThanks @Dustin.Windibank!
Committed a3d4c2f to 7.x-1.x.