]> _ Git - cubist_util.git/commitdiff
wait #6516
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 24 Nov 2023 17:39:23 +0000 (18:39 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 24 Nov 2023 17:39:23 +0000 (18:39 +0100)
src/Files/VirtualDirectory.php

index ec0efa412cd13b5ef16e8ffa136f19f22baf08c1..0bf66221afad5befd0da1dae49a9810cc4e8910c 100644 (file)
@@ -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;
                 }
             }
         }