Only clone content folder if it exists

HFP-731
JI-92-path-fix Drupal-7.x-1.25
Frode Petterson 2017-02-08 10:57:16 +01:00
parent bb71ea20a3
commit e66e6c5d76
1 changed files with 3 additions and 1 deletions

View File

@ -85,7 +85,9 @@ class H5PDefaultStorage implements \H5PFileStorage {
*/ */
public function cloneContent($id, $newId) { public function cloneContent($id, $newId) {
$path = $this->path . '/content/'; $path = $this->path . '/content/';
self::copyFileTree($path . $id, $path . $newId); if (file_exists($path . $id)) {
self::copyFileTree($path . $id, $path . $newId);
}
} }
/** /**