diff options
-rwxr-xr-x | client.js | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -8,7 +8,7 @@ var fs=require("fs"), kbd=require("kbd"), toClipboard=require("to-clipboard"); -var HOSTNAME=process.argv[2]||"tomsmeding.nl",HTTPPORT=42420; +var HOSTNAME=process.argv[2]||"tomsmeding.com",HTTPPORT=42420; console.log("Using server "+HOSTNAME); @@ -177,13 +177,13 @@ function sendfile(fname,retries){ } } console.log("Successful upload"); - setTimeout(function(){ - fs.unlink(fname,function(err){ //not sync, take your time - if(err)console.log(err); - }); - },200); toClipboard.sync(body.trim()); dialog.info(body+"\n(Copied to clipboard.)"); + try { + fs.unlinkSync(fname); + } catch(e){ + console.log(e); + } }); }); req.on("error",function(err){ |