From d5fe880a57bc140f2e1469d2f1c75f815df94eff Mon Sep 17 00:00:00 2001 From: Denis Vlasenko Date: Wed, 13 Feb 2008 16:52:00 +0000 Subject: cp: add ENABLE_FEATURE_VERBOSE_CP_MESSAGE. Closes bug 1470 --- coreutils/libcoreutils/cp_mv_stat.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'coreutils') diff --git a/coreutils/libcoreutils/cp_mv_stat.c b/coreutils/libcoreutils/cp_mv_stat.c index 43583d4..ff7c273 100644 --- a/coreutils/libcoreutils/cp_mv_stat.c +++ b/coreutils/libcoreutils/cp_mv_stat.c @@ -27,6 +27,12 @@ int cp_mv_stat2(const char *fn, struct stat *fn_stat, stat_func sf) { if (sf(fn, fn_stat) < 0) { if (errno != ENOENT) { +#if ENABLE_FEATURE_VERBOSE_CP_MESSAGE + if (errno == ENOTDIR) { + bb_error_msg("cannot stat '%s': Path has non-directory component", fn); + return -1; + } +#endif bb_perror_msg("cannot stat '%s'", fn); return -1; } -- cgit v1.1