From 6006803180b62ff014c202e4d57141ff63d15564 Mon Sep 17 00:00:00 2001 From: Fabian Schmengler Date: Fri, 22 May 2015 17:23:36 +0200 Subject: [PATCH] Use basedir in "clean" action --- modman.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/modman.php b/modman.php index b3bd0d1..f5a1f3e 100644 --- a/modman.php +++ b/modman.php @@ -656,7 +656,12 @@ class Modman_Command_Clean { */ public function doClean() { $oResourceRemover = new Modman_Resource_Remover(); - foreach ($this->getDeadSymlinks() as $sSymlink) { + $sBaseDirFile = Modman_Command_Init::getBaseDirFile(); + $sBaseDir = null; + if (file_exists($sBaseDirFile)) { + $sBaseDir = file_get_contents($sBaseDirFile); + } + foreach ($this->getDeadSymlinks($sBaseDir) as $sSymlink) { echo 'Remove ' . $sSymlink . '.' . PHP_EOL; $oResourceRemover->doRemoveResource($sSymlink); }