diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2008-03-31 21:48:27 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2008-03-31 21:48:27 +0200 |
commit | 3e6eeed0168f4b039335a807642b41e622a99cce (patch) | |
tree | c5bfd38ce360bfbe9d7d37c09ed59da05b1e0fb3 /commands/net.c | |
parent | 88da79df252446a4418c6a06289f7af9a137495e (diff) | |
download | barebox-3e6eeed0168f4b039335a807642b41e622a99cce.tar.gz barebox-3e6eeed0168f4b039335a807642b41e622a99cce.tar.xz |
netboot commands: When downloading a file and no local filename is given,
just use the filename as resulting file, not the whole path.
Diffstat (limited to 'commands/net.c')
-rw-r--r-- | commands/net.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/commands/net.c b/commands/net.c index 93c6365ef6..87c31681b6 100644 --- a/commands/net.c +++ b/commands/net.c @@ -35,6 +35,7 @@ #include <fcntl.h> #include <errno.h> #include <libbb.h> +#include <libgen.h> static int netboot_common (proto_t, cmd_tbl_t *, int , char *[]); @@ -204,7 +205,7 @@ netboot_common (proto_t proto, cmd_tbl_t *cmdtp, int argc, char *argv[]) remotefile = argv[1]; if (argc == 2) - localfile = remotefile; + localfile = basename(remotefile); else localfile = argv[2]; |