cp: Use posix_basename() on source argument
The GNU basename version does not work with strings which have a
trailing slash. Use posix_basename instead. With this cp -r
can properly work on source arguments which have a trailing slash,
i.e. "cp /dir1/ dst".

Reported-by: Peter Mamonov <pmamonov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
1 parent f90427b commit 7418bf8e11ce2cecc78feef1c13eafd9cb429137
@Sascha Hauer Sascha Hauer authored on 19 Apr 2017
Showing 1 changed file
View
commands/cp.c