Skip to content

Commit

Permalink
Merge bd5822e into ac36fb2
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcelHernandez authored and MarcelHernandez committed Nov 27, 2015
2 parents ac36fb2 + bd5822e commit a652773
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions Mage/Task/BuiltIn/Filesystem/LinkSharedFilesTask.php
Expand Up @@ -61,10 +61,9 @@ public function getName()
*/
public function run()
{
$linkedEntities = array_merge(
$this->getParameter(self::LINKED_FILES, array()),
$this->getParameter(self::LINKED_FOLDERS, array())
);
$linkedFiles = $this->getParameter(self::LINKED_FILES, array());
$linkedFolders = $this->getParameter(self::LINKED_FOLDERS, array());
$linkedEntities = array_merge($linkedFiles, $linkedFolders);

if (empty($linkedEntities)) {
throw new SkipException('No files and folders configured for sym-linking.');
Expand All @@ -83,7 +82,7 @@ public function run()
} else {
$target = $sharedFolderPath . '/' . $entityPath;
}
$command = 'mkdir -p ' . escapeshellarg(dirname($target));
$command = 'mkdir -p ' . escapeshellarg(in_array($ePath, $linkedFolders) ? $target : dirname($target));
$this->runCommandRemote($command);
$command = 'ln -nfs ' . escapeshellarg($target) . ' ' . escapeshellarg($currentCopy . '/' . $entityPath);
$this->runCommandRemote($command);
Expand Down

0 comments on commit a652773

Please sign in to comment.