mirror of
https://github.com/yuzu-emu/shared-hugo-scripts
synced 2024-11-22 10:53:46 +00:00
Check if gameicon and boxart exist before copying.
This commit is contained in:
parent
851d43125f
commit
6e20ba8a62
1 changed files with 6 additions and 2 deletions
|
@ -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 a new issue