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,8 +85,10 @@ class H5PDefaultStorage implements \H5PFileStorage {
*/
public function cloneContent($id, $newId) {
$path = $this->path . '/content/';
if (file_exists($path . $id)) {
self::copyFileTree($path . $id, $path . $newId);
}
}
/**
* Get path to a new unique tmp folder.