Skip to content

Commit

Permalink
Abs Path for Symlink
Browse files Browse the repository at this point in the history
  • Loading branch information
gossi committed Aug 17, 2013
1 parent 232e46c commit 8caf332
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/keeko/composer/KeekoComposerInstaller.php
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down Expand Up @@ -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);
}
}
}
Expand Down

0 comments on commit 8caf332

Please sign in to comment.