diff --git a/h5p.classes.php b/h5p.classes.php index d6a1c16..3d656c2 100644 --- a/h5p.classes.php +++ b/h5p.classes.php @@ -785,7 +785,7 @@ class H5PStorage { $this->h5pF->saveLibraryData($library, $new); $current_path = $this->h5pF->getUploadedH5pFolderPath() . DIRECTORY_SEPARATOR . $key; - $destination_path = $this->h5pF->getH5pPath() . DIRECTORY_SEPARATOR . 'libraries' . DIRECTORY_SEPARATOR . $library['libraryId']; + $destination_path = $this->h5pF->getH5pPath() . DIRECTORY_SEPARATOR . 'libraries' . DIRECTORY_SEPARATOR . $this->h5pC->libraryToString($library, TRUE); $this->h5pC->delTree($destination_path); rename($current_path, $destination_path); } @@ -1005,8 +1005,8 @@ class H5PCore { * @return string * On the form {machineName} {majorVersion}.{minorVersion} */ - public function libraryToString($library) { - return $library['machineName'] . ' ' . $library['majorVersion'] . '.' . $library['minorVersion']; + public function libraryToString($library, $folderName = FALSE) { + return $library['machineName'] . ($folderName ? '_' : ' ') . $library['majorVersion'] . '.' . $library['minorVersion']; } } ?> \ No newline at end of file