Skip to content

Commit

Permalink
Fixed #76: corrects the assumption that basename provides a unique co…
Browse files Browse the repository at this point in the history
…mparison.
  • Loading branch information
David Alger committed Mar 5, 2014
1 parent 5e3730d commit c812c5c
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public function createDelegate($source, $dest)
// Namespace/ModuleDir => Namespace/ModuleDir, but ModuleDir may exist

if (file_exists($destPath) && is_dir($destPath)) {
if (basename($sourcePath) === basename($destPath)) {
if (strcmp($dest, $source) === 0) {

This comment has been minimized.

Copy link
@bragento

bragento Apr 16, 2014

Unfortunately this change seems to have some negative side effects. Since 2.0.0-beta2 we are experiencing the following behaviour:

  1. Magento root dir is not empty. The app folder already exists
  2. We try to install the project with the copy deploy strategy
  3. Instead of copying the contents of vendor/myVendor/myModule/app/* into the magentoRoot/app/ directory, it places the app folder itself within the magentoRoot/app/ directory

This comment has been minimized.

Copy link
@davidalger

davidalger via email Apr 17, 2014

This comment has been minimized.

Copy link
@bragento

bragento Apr 17, 2014

@davidalger Thanks for your quick reply. Actually the problem can be reproduced pretty easily.
Modman of Magento Core:

* /
.htaccess .htaccess

Now simply create the Magento-Root Dir. Add an empty "app" folder to it. Trigger composer install.
The Magento app folder itself ends up within the created empty app folder instead of its content

This comment has been minimized.

Copy link
@davidalger

davidalger Apr 18, 2014

Discussion continued on issue #76

// copy each child of $sourcePath into $destPath
foreach (new \DirectoryIterator($sourcePath) as $item) {
$item = (string) $item;
Expand Down

0 comments on commit c812c5c

Please sign in to comment.