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

dustin@pi’s picture

markhalliwell’s picture

Status: Needs review » Fixed

Thanks @Dustin.Windibank!

Committed a3d4c2f to 7.x-1.x.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

  • Commit a3d4c2f on 7.x-1.x, icon_tabs-integration authored by Dustin@PI, committed by Mark Carver:
    Issue #2183233 by Dustin@PI: Icon_archive_extract requires files to be...