diff --git a/bin/reloadpsl b/bin/reloadpsl index b006cb5..cf9a0e7 100755 --- a/bin/reloadpsl +++ b/bin/reloadpsl @@ -14,7 +14,7 @@ function includeIfExists($file) } } -if ((!$loader = includeIfExists(__DIR__.'/../vendor/autoload.php')) +if ((!$loader = includeIfExists(__DIR__.'/../autoload.php')) && (!$loader = includeIfExists(__DIR__.'/../../../autoload.php'))) { die("You must set up the project dependencies, run composer install\n"); diff --git a/src/PublicSuffixList.php b/src/PublicSuffixList.php index 231c3f2..5304e10 100644 --- a/src/PublicSuffixList.php +++ b/src/PublicSuffixList.php @@ -281,7 +281,7 @@ protected function setLocalPSLName($url) */ public function clearDataDirectory($cacheOnly = false) { - $dir = $this->dataDir; + $dir = __DIR__ . $this->dataDir; if (is_dir($dir)) { if ($dirHandle = opendir($dir)) { while (($file = readdir($dirHandle)) !== false) {