From 933fc7939260747b60ed7d1fac160988ec59ecbb Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Tue, 29 Mar 2022 11:49:32 +0200 Subject: [PATCH] wip #5184 @0.5 --- src/Files/VirtualDirectory.php | 4 ++-- src/PHP.php | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/Files/VirtualDirectory.php b/src/Files/VirtualDirectory.php index 918ccb3..81de604 100644 --- a/src/Files/VirtualDirectory.php +++ b/src/Files/VirtualDirectory.php @@ -118,7 +118,7 @@ class VirtualDirectory } $path = $file->getRealPath(); $dest = str_replace($from, '', $path); - if(!$path){ + if (!$path) { continue; } $this->copy($path, $this->relativePath($to) . '/' . ltrim($dest, '/')); @@ -133,7 +133,7 @@ class VirtualDirectory continue; } $path = $file->getRealPath(); - if (!isset($existing[$path])) { + if (!isset($existing[$path]) && file_exists($path)) { unlink($path); } } diff --git a/src/PHP.php b/src/PHP.php index fffb548..5ba0e15 100644 --- a/src/PHP.php +++ b/src/PHP.php @@ -17,6 +17,11 @@ class PHP } } + public static function memoryAllocate($amount) + { + ini_set("memory_limit", $amount); + } + /** * @param $file * @return mixed -- 2.39.5