From 0ba22e6863f5dfe7d165e46dc3c26f8ab3c5d86d Mon Sep 17 00:00:00 2001 From: Konrad Wagner Date: Fri, 27 Feb 2015 15:05:52 +0100 Subject: [PATCH] scan root fix I actually wanted to fix windows by doing preg_split("/(\\\\|\\/)/" instead of explode. But why even go to parent directory? --- services/scanners/ScannerFile.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/services/scanners/ScannerFile.php b/services/scanners/ScannerFile.php index 38ff007..716f814 100644 --- a/services/scanners/ScannerFile.php +++ b/services/scanners/ScannerFile.php @@ -173,13 +173,11 @@ protected function extractMessages($fileName, $options) { abstract protected function getLanguageItem($buffer); /** - * Returns the root directory of the project. + * Returns the root directory of the project scan. * @return string */ private function _getRoot() { - $directories = explode(DIRECTORY_SEPARATOR, Yii::getAlias($this->module->root)); - array_pop($directories); - return implode(DIRECTORY_SEPARATOR, $directories); + return Yii::getAlias($this->module->root); } /**