From 8caf332c6fea59b53d61970e78ef709da65df049 Mon Sep 17 00:00:00 2001 From: gossi Date: Sat, 17 Aug 2013 22:16:38 +0200 Subject: [PATCH] Abs Path for Symlink --- src/keeko/composer/KeekoComposerInstaller.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/keeko/composer/KeekoComposerInstaller.php b/src/keeko/composer/KeekoComposerInstaller.php index 7bbda29..18c463a 100644 --- a/src/keeko/composer/KeekoComposerInstaller.php +++ b/src/keeko/composer/KeekoComposerInstaller.php @@ -74,6 +74,9 @@ protected function installCode(PackageInterface $package) { $type = $package->getType(); if ($type !== 'keeko-core') { $packagePublicPath = $this->filesystem->normalizePath($installPath .'/public'); + if (!$this->filesystem->isAbsolutePath($packagePublicPath)) { + $packagePublicPath = $this->filesystem->normalizePath(getcwd() . '/' . $packagePublicPath); + } if (file_exists($packagePublicPath) && file_exists($publicPath)) { $target = $this->filesystem->normalizePath($publicPath . '/' . $this->getPackageDir($type) . '/' . $package->getName()); @@ -108,7 +111,7 @@ protected function removeCode(PackageInterface $package) { // remove parent if empty $parent = basename($target); if (count(scandir($parent)) == 2) { - $this->filesystem->removeDirectory($path); + $this->filesystem->removeDirectory($parent); } } }