Skip to content

Commit

Permalink
S3 invalid type fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Eugene Terentev committed Mar 11, 2016
1 parent 7140812 commit 0cdc678
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/Storage.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
use League\Flysystem\FilesystemInterface;
use trntv\filekit\events\StorageEvent;
use trntv\filekit\filesystem\FilesystemBuilderInterface;
use yii\base\BootstrapInterface;
use yii\base\Component;
use yii\base\InvalidConfigException;

Expand Down Expand Up @@ -129,7 +128,6 @@ public function save($file, $preserveFileName = false, $overwrite = false)
}

return false;

}

/**
Expand Down Expand Up @@ -180,14 +178,14 @@ public function deleteAll($files)
protected function getDirIndex()
{
if (!$this->getFilesystem()->has('.dirindex')) {
$this->getFilesystem()->write('.dirindex', $this->dirindex);
$this->getFilesystem()->write('.dirindex', (string) $this->dirindex);
} else {
$this->dirindex = $this->getFilesystem()->read('.dirindex');
if ($this->maxDirFiles !== -1) {
$filesCount = count($this->getFilesystem()->listContents($this->dirindex));
if ($filesCount > $this->maxDirFiles) {
$this->dirindex++;
$this->getFilesystem()->put('.dirindex', $this->dirindex);
$this->getFilesystem()->put('.dirindex', (string) $this->dirindex);
}
}
}
Expand Down

0 comments on commit 0cdc678

Please sign in to comment.