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
if (count($this->images) > 0) {
mkdir($dest.'/doc');
foreach($this->images as $img) {
copy($this->dir.$img, $dest.'/doc/'.$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
if (count($this->downloads) > 0) {
mkdir($dest.'/dist-archive');