(data)
| 40 | } |
| 41 | |
| 42 | export function writeDataIfRecording(data){ |
| 43 | try{ |
| 44 | if(GlobalSettings.record.recording && GlobalSettings.record.directory !== null){ |
| 45 | let filename = path.join(GlobalSettings.record.directory,GlobalSettings.record.outputFilename); |
| 46 | let dataWithNewline = data + "\r\n"; |
| 47 | ipcRenderer.invoke('fse','appendFile',filename,dataWithNewline); |
| 48 | } |
| 49 | } |
| 50 | catch(e){ |
| 51 | console.log("data recording error...") |
| 52 | console.log(e); |
| 53 | } |
| 54 | } |