diff options
author | Bryan Drewery <bdrewery@FreeBSD.org> | 2016-08-10 18:18:51 +0000 |
---|---|---|
committer | Bryan Drewery <bdrewery@FreeBSD.org> | 2016-08-10 18:18:51 +0000 |
commit | e9a44873095d8022fbafb0820a89ae862dd28d75 (patch) | |
tree | 6511ff78824574b6e1f80eb7b97ee1dcc55e1833 /usr.bin/xinstall | |
parent | be46a7c54dd2a7204106562dfde2574b64bc29a3 (diff) | |
download | src-e9a44873095d8022fbafb0820a89ae862dd28d75.tar.gz src-e9a44873095d8022fbafb0820a89ae862dd28d75.zip |
Trim out excessive / with -v when target directory ends with a trailing '/'.
This is a minor nit after r289391 made all installations to a directory always
end in a trailing '/'.
MFC after: 3 days
Sponsored by: EMC / Isilon Storage Division
Notes
Notes:
svn path=/head/; revision=303928
Diffstat (limited to 'usr.bin/xinstall')
-rw-r--r-- | usr.bin/xinstall/xinstall.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.bin/xinstall/xinstall.c b/usr.bin/xinstall/xinstall.c index f8b4568cd542..8cf7b9f1266f 100644 --- a/usr.bin/xinstall/xinstall.c +++ b/usr.bin/xinstall/xinstall.c @@ -749,8 +749,9 @@ install(const char *from_name, const char *to_name, u_long fset, u_int flags) } /* Build the target path. */ if (flags & DIRECTORY) { - (void)snprintf(pathbuf, sizeof(pathbuf), "%s/%s", + (void)snprintf(pathbuf, sizeof(pathbuf), "%s%s%s", to_name, + to_name[strlen(to_name) - 1] == '/' ? "" : "/", (p = strrchr(from_name, '/')) ? ++p : from_name); to_name = pathbuf; } |