mirror of
https://github.com/andres-montanez/Magallanes
synced 2024-06-17 04:55:03 +02:00
[FIX] Fix linked folder creation
This commit is contained in:
parent
ac36fb29d5
commit
bd5822ea0a
|
@ -61,10 +61,9 @@ class LinkSharedFilesTask extends AbstractTask implements IsReleaseAware
|
||||||
*/
|
*/
|
||||||
public function run()
|
public function run()
|
||||||
{
|
{
|
||||||
$linkedEntities = array_merge(
|
$linkedFiles = $this->getParameter(self::LINKED_FILES, array());
|
||||||
$this->getParameter(self::LINKED_FILES, array()),
|
$linkedFolders = $this->getParameter(self::LINKED_FOLDERS, array());
|
||||||
$this->getParameter(self::LINKED_FOLDERS, array())
|
$linkedEntities = array_merge($linkedFiles, $linkedFolders);
|
||||||
);
|
|
||||||
|
|
||||||
if (empty($linkedEntities)) {
|
if (empty($linkedEntities)) {
|
||||||
throw new SkipException('No files and folders configured for sym-linking.');
|
throw new SkipException('No files and folders configured for sym-linking.');
|
||||||
|
@ -83,7 +82,7 @@ class LinkSharedFilesTask extends AbstractTask implements IsReleaseAware
|
||||||
} else {
|
} else {
|
||||||
$target = $sharedFolderPath . '/' . $entityPath;
|
$target = $sharedFolderPath . '/' . $entityPath;
|
||||||
}
|
}
|
||||||
$command = 'mkdir -p ' . escapeshellarg(dirname($target));
|
$command = 'mkdir -p ' . escapeshellarg(in_array($ePath, $linkedFolders) ? $target : dirname($target));
|
||||||
$this->runCommandRemote($command);
|
$this->runCommandRemote($command);
|
||||||
$command = 'ln -nfs ' . escapeshellarg($target) . ' ' . escapeshellarg($currentCopy . '/' . $entityPath);
|
$command = 'ln -nfs ' . escapeshellarg($target) . ' ' . escapeshellarg($currentCopy . '/' . $entityPath);
|
||||||
$this->runCommandRemote($command);
|
$this->runCommandRemote($command);
|
||||||
|
|
Loading…
Reference in a new issue