aboutsummaryrefslogtreecommitdiff
path: root/src/fs/gnunet-download.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/fs/gnunet-download.c')
-rw-r--r--src/fs/gnunet-download.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/fs/gnunet-download.c b/src/fs/gnunet-download.c
index bc98d0275..fde254d7c 100644
--- a/src/fs/gnunet-download.c
+++ b/src/fs/gnunet-download.c
@@ -52,6 +52,7 @@ static int do_recursive;
52 52
53static char *filename; 53static char *filename;
54 54
55static int local_only;
55 56
56static void 57static void
57cleanup_task (void *cls, 58cleanup_task (void *cls,
@@ -225,6 +226,8 @@ run (void *cls,
225 options = GNUNET_FS_DOWNLOAD_OPTION_NONE; 226 options = GNUNET_FS_DOWNLOAD_OPTION_NONE;
226 if (do_recursive) 227 if (do_recursive)
227 options |= GNUNET_FS_DOWNLOAD_OPTION_RECURSIVE; 228 options |= GNUNET_FS_DOWNLOAD_OPTION_RECURSIVE;
229 if (local_only)
230 options |= GNUNET_FS_DOWNLOAD_OPTION_LOOPBACK_ONLY;
228 dc = GNUNET_FS_download_start (ctx, 231 dc = GNUNET_FS_download_start (ctx,
229 uri, 232 uri,
230 NULL, 233 NULL,
@@ -259,6 +262,9 @@ static struct GNUNET_GETOPT_CommandLineOption options[] = {
259 {'D', "delete-incomplete", NULL, 262 {'D', "delete-incomplete", NULL,
260 gettext_noop ("delete incomplete downloads (when aborted with CTRL-C)"), 263 gettext_noop ("delete incomplete downloads (when aborted with CTRL-C)"),
261 0, &GNUNET_GETOPT_set_one, &delete_incomplete}, 264 0, &GNUNET_GETOPT_set_one, &delete_incomplete},
265 {'n', "no-network", NULL,
266 gettext_noop ("only search the local peer (no P2P network search)"),
267 1, &GNUNET_GETOPT_set_uint, &local_only},
262 {'o', "output", "FILENAME", 268 {'o', "output", "FILENAME",
263 gettext_noop ("write the file to FILENAME"), 269 gettext_noop ("write the file to FILENAME"),
264 1, &GNUNET_GETOPT_set_string, &filename}, 270 1, &GNUNET_GETOPT_set_string, &filename},