From d3cc78996528f848b6bac288414a6df7d8d76db9 Mon Sep 17 00:00:00 2001 From: Gilles De Mey Date: Wed, 12 Aug 2015 01:55:40 +0200 Subject: Default download destination should be current directory, fixes #390 --- bin/cmd.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'bin/cmd.js') diff --git a/bin/cmd.js b/bin/cmd.js index 31bde0b..37ae394 100755 --- a/bin/cmd.js +++ b/bin/cmd.js @@ -193,7 +193,7 @@ Options (streaming): --stdout standard out (implies --quiet) Options (simple): - -o, --out [path] set download destination [default: /tmp/webtorrent] + -o, --out [path] set download destination [default: current directory] -s, --select select individual file in torrent (by index) -i, --index [number] stream a particular file from torrent (by index) -v, --version print the current version @@ -254,6 +254,11 @@ function runCreate (input) { var client, href, playerName, server, serving function runDownload (torrentId) { + + if (!argv.out && !playerName) { + argv.out = process.cwd() + } + client = new WebTorrent({ blocklist: argv.blocklist }) -- cgit v1.2.3