Skip to content

Commit

Permalink
Remove call to Utilities::getBaseDirectory unless path option is not …
Browse files Browse the repository at this point in the history
…passed

This should resolve #263.
  • Loading branch information
tedivm committed Oct 18, 2015
1 parent d1d938e commit c71eaca
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
## Stash v0.13 Changelog


### 0.13.2

* Fixed bug where the default filesystem driver path would be created even when a path was specified.

### 0.13.1

* Dropped support for PHP 5.3.
Expand Down
4 changes: 3 additions & 1 deletion src/Stash/Driver/FileSystem.php
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,6 @@ class FileSystem extends AbstractDriver
public function getDefaultOptions()
{
return array(
'path' => Utilities::getBaseDirectory($this),
'filePermissions' => 0660,
'dirPermissions' => 0770,
'dirSplit' => 2,
Expand All @@ -133,6 +132,9 @@ public function getDefaultOptions()
public function setOptions(array $options = array())
{
$options += $this->getDefaultOptions();
if (!isset($options['path'])) {
$options['path'] = Utilities::getBaseDirectory($this);
}

$this->cachePath = rtrim($options['path'], '\\/') . DIRECTORY_SEPARATOR;
$this->filePermissions = $options['filePermissions'];
Expand Down

0 comments on commit c71eaca

Please sign in to comment.