diff --git a/h5p.classes.php b/h5p.classes.php index 5940e06..619463a 100644 --- a/h5p.classes.php +++ b/h5p.classes.php @@ -1275,7 +1275,8 @@ class H5PStorage { } $destination_path = $libraries_path . DIRECTORY_SEPARATOR . H5PCore::libraryToString($library, TRUE); H5PCore::deleteFileTree($destination_path); - rename($library['uploadDirectory'], $destination_path); + $this->h5pC->copyFileTree($library['uploadDirectory'], $destination_path); + H5PCore::deleteFileTree($library['uploadDirectory']); $library_saved = TRUE; }