diff --git a/src/trigger/parser.js b/src/trigger/parser.js index 40ea40b..4121245 100644 --- a/src/trigger/parser.js +++ b/src/trigger/parser.js @@ -174,13 +174,14 @@ module.exports = (lib) => { dat .on('finish', () => { + lib.log('bin im Finishevent gelandet, keine Ahnung wieso.'); var size = dat.bytesWritten; dat.end(); if(size > cfg.maxFileSize) cb({ success: false, file: tmpdest, msg: 'f0ck! your file is too big (~'+lib.formatSize(size)+'), max '+lib.formatSize(cfg.maxFileSize)+' allowed' }); else { fs.stat('./b/' + tmpdest, (err, stat) => { - if(err === null) { + if(!err) { lib.getCheckSum('./b/' + tmpdest, (cbcs) => { lib.checkRepostCheckSum(cbcs, (cbcrcs) => { if(cbcrcs === true) { @@ -195,9 +196,6 @@ module.exports = (lib) => { }); }); } - else { - cb({ success: false, file: tmpdest, msg: 'keine Ahnung' }); - } }); } })