svn commit: [25813] trunk/busybox/networking
vda at busybox.net
vda at busybox.net
Wed Mar 25 03:55:54 UTC 2009
Author: vda
Date: 2009-03-25 03:55:53 +0000 (Wed, 25 Mar 2009)
New Revision: 25813
Log:
tftp: when we infer local name from remote (-r [/]path/path/file),
strip path. This mimics wget and is generally more intuitive.
Modified:
trunk/busybox/networking/tftp.c
Changeset:
Modified: trunk/busybox/networking/tftp.c
===================================================================
--- trunk/busybox/networking/tftp.c 2009-03-24 19:57:48 UTC (rev 25812)
+++ trunk/busybox/networking/tftp.c 2009-03-25 03:55:53 UTC (rev 25813)
@@ -589,10 +589,15 @@
}
#endif
- if (!local_file)
- local_file = remote_file;
- if (!remote_file)
+ if (remote_file) {
+ if (!local_file) {
+ const char *slash = strrchr(remote_file, '/');
+ local_file = slash ? slash + 1 : remote_file;
+ }
+ } else {
remote_file = local_file;
+ }
+
/* Error if filename or host is not known */
if (!remote_file || !argv[0])
bb_show_usage();
More information about the busybox-cvs
mailing list