summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortomsmeding <tom.smeding@gmail.com>2016-01-21 17:42:38 +0100
committertomsmeding <tom.smeding@gmail.com>2016-01-21 17:42:38 +0100
commit9a432dc4bdd827ea42a46fae8bb7cdd02dd8b19d (patch)
treeb45f6cb1779877cd21b1b0b5f98d1b8bec71c5bb
parentd8bf5919a86a15da4385fcf1f049a3ec0cc47dcf (diff)
:crocodile:
-rwxr-xr-xclient.js12
1 files 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){