codesite2git: normalise some image file extensions

This commit is contained in:
mappu 2020-05-04 18:08:27 +12:00
parent bd70d6ae41
commit 5079427678

View File

@ -71,13 +71,15 @@ class CProjectGitExporter extends CProject {
} }
// Copy all images to a doc/ subdirectory // Copy all images to a doc/ subdirectory
mkdir($dest.'/doc'); if (count($this->images) > 0) {
foreach($this->images as $img) { mkdir($dest.'/doc');
copy($this->dir.$img, $dest.'/doc/'.$img); foreach($this->images as $img) {
// Normalise some legacy file extension variants while we're here
copy($this->dir.$img, $dest.'/doc/'.str_replace(['.jpeg', '.JPG', '.JPEG'], ['.jpg', '.jpg', '.jpg'], $img));
}
} }
// Copy all downloads to a dist-archive/ subdirectory // Copy all downloads to a dist-archive/ subdirectory
if (count($this->downloads) > 0) { if (count($this->downloads) > 0) {
mkdir($dest.'/dist-archive'); mkdir($dest.'/dist-archive');