diff options
Diffstat (limited to 'coreutils')
-rw-r--r-- | coreutils/cp.c | 1 | ||||
-rw-r--r-- | coreutils/libcoreutils/cp_mv_stat.c | 3 |
2 files changed, 2 insertions, 2 deletions
diff --git a/coreutils/cp.c b/coreutils/cp.c index 5b575819c..76dc566b3 100644 --- a/coreutils/cp.c +++ b/coreutils/cp.c @@ -69,7 +69,6 @@ int cp_main(int argc, char **argv) if (argc == 2) { s_flags = cp_mv_stat2(*argv, &source_stat, (flags & FILEUTILS_DEREFERENCE) ? stat : lstat); - /* TODO: does coreutils cp exit? "cp BAD GOOD dir"... */ if (s_flags < 0) return EXIT_FAILURE; d_flags = cp_mv_stat(last, &dest_stat); diff --git a/coreutils/libcoreutils/cp_mv_stat.c b/coreutils/libcoreutils/cp_mv_stat.c index 2e4f25e21..43583d48b 100644 --- a/coreutils/libcoreutils/cp_mv_stat.c +++ b/coreutils/libcoreutils/cp_mv_stat.c @@ -31,7 +31,8 @@ int cp_mv_stat2(const char *fn, struct stat *fn_stat, stat_func sf) return -1; } return 0; - } else if (S_ISDIR(fn_stat->st_mode)) { + } + if (S_ISDIR(fn_stat->st_mode)) { return 3; } return 1; |