mirror of
https://github.com/yuzu-emu/shared-hugo-scripts.git
synced 2024-11-23 16:15:39 +01:00
Check if gameicon and boxart exist before copying.
This commit is contained in:
parent
851d43125f
commit
6e20ba8a62
@ -70,10 +70,14 @@ async function run() {
|
||||
x.issues = x.issues || []
|
||||
|
||||
// Copy the boxart for the game.
|
||||
fs.copySync(`${fsPathCode}/${x.id}/boxart.png`, `${fsPathHugoBoxart}/${x.id}.png`);
|
||||
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.
|
||||
fs.copySync(`${fsPathCode}/${x.id}/icon.png`, `${fsPathHugoIcon}/${x.id}.png`);
|
||||
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/`;
|
||||
|
Loading…
Reference in New Issue
Block a user