From aff7745231fc2fd83238edd10ef949da054d0bd7 Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Mon, 23 Apr 2012 10:56:46 +0200 Subject: [PATCH] Fix target-dir autoloader --- src/Composer/Autoload/AutoloadGenerator.php | 6 +++--- .../Composer/Test/Autoload/Fixtures/autoload_target_dir.php | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Composer/Autoload/AutoloadGenerator.php b/src/Composer/Autoload/AutoloadGenerator.php index c94004c20..3d8c7b752 100644 --- a/src/Composer/Autoload/AutoloadGenerator.php +++ b/src/Composer/Autoload/AutoloadGenerator.php @@ -88,12 +88,12 @@ EOF; $prefixes = implode(', ', array_map(function ($prefix) { return var_export($prefix, true); }, array_keys($mainAutoload['psr-0']))); - $baseDirFromTargetDirCode = $filesystem->findShortestPathCode(realpath($targetDir), getcwd(), true); + $baseDirFromVendorDirCode = $filesystem->findShortestPathCode($vendorPath, getcwd(), true); $targetDirLoader = <<