From: Vincent Vanwaelscappel Date: Fri, 24 Nov 2023 17:39:23 +0000 (+0100) Subject: wait #6516 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=5f0c048cac774634f6296cf3bddd7b4862c55842;p=cubist_util.git wait #6516 --- diff --git a/src/Files/VirtualDirectory.php b/src/Files/VirtualDirectory.php index ec0efa4..0bf6622 100644 --- a/src/Files/VirtualDirectory.php +++ b/src/Files/VirtualDirectory.php @@ -55,6 +55,7 @@ class VirtualDirectory { if ($check && !file_exists($from)) { $this->throwError(sprintf('File "%s" doesn\'t exist (to %s)', $from, $to)); + return $this; } $realto = $this->path($to); if (!$realto) { @@ -75,6 +76,7 @@ class VirtualDirectory { if (!file_exists($from)) { $this->throwError(sprintf('Directory %s doen\'t exist', $from)); + return $this; } $this->_directories[$this->path($to)] = $from; return $this; @@ -93,7 +95,6 @@ class VirtualDirectory { $existing = array(); - foreach ($this->_directories as $to => $from) { $this->_addDirectory($from, $to); } @@ -110,6 +111,7 @@ class VirtualDirectory if (!file_exists($from)) { $this->throwError(sprintf('Failed to copy %s to %s. Source doesn\'t exist', $from, $to)); + continue; } if (!file_exists($to) || filesize($from) !== filesize($to) || filemtime($from) !== filemtime($to)) { @@ -118,6 +120,7 @@ class VirtualDirectory `cp -p $from_esc $to_esc`; if (!file_exists($to)) { $this->throwError(sprintf('Failed to copy %s to %s', $from, $to)); + continue; } } }