Skip to content

Commit

Permalink
Fixes rom copy bug if file does not exist
Browse files Browse the repository at this point in the history
  • Loading branch information
cosmo0 committed May 2, 2018
1 parent 7933784 commit 4ae3eaf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "arcade-manager",
"version": "4.1.0",
"version": "4.2.0",
"description": "Arcade games manager to be used with Retropie and Recalbox",
"main": "src/index.js",
"scripts": {
Expand Down
4 changes: 4 additions & 0 deletions src/roms.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ module.exports = class Roms extends events {
* @returns The entry size with the size unit
*/
entrySize(entry) {
if (!fs.existsSync(entry)) {
return '';
}

let size = 0;
let stat = fs.statSync(entry);

Expand Down

0 comments on commit 4ae3eaf

Please sign in to comment.