summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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){