diff options
author | LawnCable <lawncable.tmw2@simonlaux.de> | 2018-06-19 01:07:57 +0200 |
---|---|---|
committer | LawnCable <lawncable.tmw2@simonlaux.de> | 2018-06-19 01:07:57 +0200 |
commit | c79ab9ac1a74c8ec9c225c10498591ebb3a2d2b9 (patch) | |
tree | 7470c09925e01aef410e8ad68b36552a8ad28ae4 | |
parent | 02a213ab823145258e85858bf1f281069e3369d2 (diff) | |
download | electron-c79ab9ac1a74c8ec9c225c10498591ebb3a2d2b9.tar.gz electron-c79ab9ac1a74c8ec9c225c10498591ebb3a2d2b9.tar.bz2 electron-c79ab9ac1a74c8ec9c225c10498591ebb3a2d2b9.tar.xz electron-c79ab9ac1a74c8ec9c225c10498591ebb3a2d2b9.zip |
bug fix - Error message if going on screenshots on server that wasn't started yet so the missing folder caused an error
-rw-r--r-- | src/main/manaplus/manaplus.ts | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/main/manaplus/manaplus.ts b/src/main/manaplus/manaplus.ts index 590b9f4..190febe 100644 --- a/src/main/manaplus/manaplus.ts +++ b/src/main/manaplus/manaplus.ts @@ -87,6 +87,7 @@ export namespace ManaPlus{ ipcMain.on('getScreenshots', (event:any, arg:string)=> { const screenshotsDir = path.normalize(app.getPath('userData')+`/screenshots/${arg}/`); + fs.existsSync(screenshotsDir) || fs.mkdirSync(screenshotsDir); fs.readdir(screenshotsDir, (err, dir) => { let screenshots:string[]=[]; for (var i = 0, path; path = dir[i]; i++) { |