Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/webtorrent/webtorrent.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGilles De Mey <gilles.de.mey@gmail.com>2015-08-12 02:55:40 +0300
committerGilles De Mey <gilles.de.mey@gmail.com>2015-08-12 02:55:40 +0300
commitd3cc78996528f848b6bac288414a6df7d8d76db9 (patch)
treed0875daba3b0891540fe04cda161073ba08e8c13 /bin/cmd.js
parentb4df1162e19c8ef88a32384ceb422b0a50963164 (diff)
Default download destination should be current directory, fixes #390
Diffstat (limited to 'bin/cmd.js')
-rwxr-xr-xbin/cmd.js7
1 files changed, 6 insertions, 1 deletions
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
})