From 9a432dc4bdd827ea42a46fae8bb7cdd02dd8b19d Mon Sep 17 00:00:00 2001 From: tomsmeding Date: Thu, 21 Jan 2016 17:42:38 +0100 Subject: :crocodile: --- client.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/client.js b/client.js index 6a111a3..51a5d33 100755 --- a/client.js +++ b/client.js @@ -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){ -- cgit v1.2.3-70-g09d2