diff options
| author | Steve Price <steve@FreeBSD.org> | 1998-05-25 22:45:42 +0000 |
|---|---|---|
| committer | Steve Price <steve@FreeBSD.org> | 1998-05-25 22:45:42 +0000 |
| commit | 283ffdcfac4698dca9f8f7a739f9eecb6dd214b3 (patch) | |
| tree | 09aa654cc4c65f4dce450c47c8f54df67359737a /bin | |
| parent | d4d195bb163595697eb05989b591d27a803067ef (diff) | |
Notes
Diffstat (limited to 'bin')
| -rw-r--r-- | bin/mv/mv.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/bin/mv/mv.c b/bin/mv/mv.c index 446583612671..6a6ecbca34c8 100644 --- a/bin/mv/mv.c +++ b/bin/mv/mv.c @@ -33,7 +33,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: mv.c,v 1.8.2.1 1997/08/25 08:33:11 jkh Exp $ + * $Id: mv.c,v 1.8.2.2 1998/02/15 11:16:28 jkh Exp $ */ #ifndef lint @@ -113,8 +113,10 @@ main(argc, argv) (void)strcpy(path, argv[argc - 1]); baselen = strlen(path); endp = &path[baselen]; - *endp++ = '/'; - ++baselen; + if (!baselen || *(endp - 1) != '/') { + *endp++ = '/'; + ++baselen; + } for (rval = 0; --argc; ++argv) { /* * Find the last component of the source pathname. It |
