Check if gameicon and boxart exist before copying.

This commit is contained in:
Chris 2018-05-18 21:12:44 -04:00
parent 851d43125f
commit 6e20ba8a62

View file

@ -70,10 +70,14 @@ async function run() {
x.issues = x.issues || []
// Copy the boxart for the game.
if (fs.existsSync(`${fsPathCode}/${x.id}/boxart.png`)) {
fs.copySync(`${fsPathCode}/${x.id}/boxart.png`, `${fsPathHugoBoxart}/${x.id}.png`);
}
// Copy the icon for the game.
if (fs.existsSync(`${fsPathCode}/${x.id}/icon.png`)) {
fs.copySync(`${fsPathCode}/${x.id}/icon.png`, `${fsPathHugoIcon}/${x.id}.png`);
}
// SAVEFILE BLOCK
var fsPathCodeSavefilesGame = `${fsPathCode}/${x.id}/savefiles/`;