Skip to content

Commit

Permalink
workaround for zipped folders (e.g. with mac)
Browse files Browse the repository at this point in the history
  • Loading branch information
novinet-dsteffen committed Nov 24, 2021
1 parent bad4de5 commit 32dbb2e
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions lib/gridblock_importer.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,16 @@ public static function import($aFile)

$aItems = scandir($oAddon->getDataPath($sFolderImport));

// check for zipped folder workaround
$sCheckFolderName = pathinfo($aFile["name"])["filename"];
foreach($aItems AS $sItem) {
if ($sItem == $sCheckFolderName) {
$sFolderImport = $sFolderImport."/".$sCheckFolderName;
$aItems = scandir($oAddon->getDataPath($sFolderImport));
break;
}
}

foreach ($aItems as $sItem) {

if ($sItem != "." && $sItem != "..") {
Expand Down

0 comments on commit 32dbb2e

Please sign in to comment.