Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Activate switch to avoid relative path names in __construct of cache …

…model
  • Loading branch information...
commit e4a21846ba3048ec8851f284f1cca4f6d0a19491 1 parent cd54d43
@Vinai authored
Showing with 8 additions and 4 deletions.
  1. +8 −4 app/code/community/Netzarbeiter/Cache/Model/Symlink.php
View
12 app/code/community/Netzarbeiter/Cache/Model/Symlink.php
@@ -35,10 +35,14 @@ class Netzarbeiter_Cache_Model_Symlink extends Zend_Cache_Backend_File
public function __construct(array $options = array())
{
parent::__construct($options);
-// if ($this->_options['cache_dir'] !== null && substr($this->_options['cache_dir'], 0, 1) !== '/')
-// {
-// $this->_options['cache_dir'] = Mage::getBaseDir('cache') . DS . $this->_options['cache_dir'];
-// }
+
+ // this is ugly, but if no absolute path is set cronjobs and cli scripts
+ // might fail. It's ugly because this is the only part of the class that
+ // now uses code from the Magento core.
+ if ($this->_options['cache_dir'] !== null && substr($this->_options['cache_dir'], 0, 1) !== '/')
+ {
+ $this->_options['cache_dir'] = Mage::getBaseDir('cache') . DS . $this->_options['cache_dir'];
+ }
}
/**
Please sign in to comment.
Something went wrong with that request. Please try again.