Skip to content

Commit

Permalink
Fixed a problem with blobs in default folder
Browse files Browse the repository at this point in the history
  • Loading branch information
benjaminhirsch committed Jul 24, 2017
1 parent 6844823 commit b36023e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
13 changes: 10 additions & 3 deletions Classes/Driver/StorageDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -1026,8 +1026,15 @@ public function countFoldersInFolder($folderIdentifier, $recursive = false, arra
$blob = $iterator->current();
// go on to the next iterator item now as we might skip this one early
$iterator->next();
if ($this->isFolder(str_replace($folderIdentifier, '', $blob->getName()))) {
$folders++;

if ($folderIdentifier === $this->getDefaultFolder()) {
if ($this->isFolder($blob->getName()) && substr_count($blob->getName(), '/') == 1) {
$folders++;
}
} else {
if ($this->isFolder(str_replace($folderIdentifier, '', $blob->getName()))) {
$folders++;
}
}
}

Expand Down Expand Up @@ -1189,7 +1196,7 @@ protected function createBlockBlob($name, $content = '', CreateBlobOptions $opti
*/
protected function getBlobsFromFolder($sourceFolderIdentifier)
{
return $this->getListBlobs($sourceFolderIdentifier);
return $this->getListBlobs($sourceFolderIdentifier);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion ext_emconf.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
'title' => 'Azure Storage',
'description' => 'Microsoft Azure Blob Storage for TYPO3',
'category' => 'be',
'version' => '0.4.0',
'version' => '0.4.1',
'state' => 'beta',
'clearcacheonload' => 1,
'author' => 'Benjamin Hirsch',
Expand Down

0 comments on commit b36023e

Please sign in to comment.