From e66e6c5d76fb87435195cda7ce78ca001e09e506 Mon Sep 17 00:00:00 2001 From: Frode Petterson Date: Wed, 8 Feb 2017 10:57:16 +0100 Subject: [PATCH] Only clone content folder if it exists HFP-731 --- h5p-default-storage.class.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/h5p-default-storage.class.php b/h5p-default-storage.class.php index 696e8de..0c67341 100644 --- a/h5p-default-storage.class.php +++ b/h5p-default-storage.class.php @@ -85,7 +85,9 @@ class H5PDefaultStorage implements \H5PFileStorage { */ public function cloneContent($id, $newId) { $path = $this->path . '/content/'; - self::copyFileTree($path . $id, $path . $newId); + if (file_exists($path . $id)) { + self::copyFileTree($path . $id, $path . $newId); + } } /**