diff --git a/Filesystem.php b/Filesystem.php index 2388e95..41a8757 100644 --- a/Filesystem.php +++ b/Filesystem.php @@ -21,7 +21,14 @@ public static function copy(string $source, string $target, bool $deleteSource = if ($file === '.' || $file === '..') { continue; } - \Nette\Utils\FileSystem::copy($source . '/' . $file, $target . '/' . $file); + + $sourcePath = $source . '/' . $file; + $targetPath = $target . '/' . $file; + if (is_dir($sourcePath)) { + self::copy($sourcePath, $targetPath, $deleteSource); + } else { + \Nette\Utils\FileSystem::copy($sourcePath, $targetPath); + } } if ($deleteSource) { \Nette\Utils\FileSystem::delete($source);