diff options
author | mharo <mharo@FreeBSD.org> | 1999-08-29 07:58:19 +0000 |
---|---|---|
committer | mharo <mharo@FreeBSD.org> | 1999-08-29 07:58:19 +0000 |
commit | 5e14615656821e43d8611a79c78c045e4d636190 (patch) | |
tree | 8b96b3dcce9330ec35a8a12894863500d1957d31 /bin/cp/cp.c | |
parent | bd14e46d740faa5132d836cc532864ff7f41f228 (diff) | |
download | FreeBSD-src-5e14615656821e43d8611a79c78c045e4d636190.zip FreeBSD-src-5e14615656821e43d8611a79c78c045e4d636190.tar.gz |
brucify and move printf() to catch cases of special files
Diffstat (limited to 'bin/cp/cp.c')
-rw-r--r-- | bin/cp/cp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/cp/cp.c b/bin/cp/cp.c index 488e7d8..9b5c05f 100644 --- a/bin/cp/cp.c +++ b/bin/cp/cp.c @@ -378,8 +378,6 @@ copy(argv, type, fts_options) if (mkdir(to.p_path, curr->fts_statp->st_mode | S_IRWXU) < 0) err(1, "%s", to.p_path); - if (vflag) - printf("%s -> %s\n", curr->fts_path, to.p_path); } else if (!S_ISDIR(to_stat.st_mode)) { errno = ENOTDIR; err(1, "%s", to.p_path); @@ -420,6 +418,8 @@ copy(argv, type, fts_options) rval = 1; break; } + if (!rval && vflag) + (void)printf("%s -> %s\n", curr->fts_path, to.p_path); } if (errno) err(1, "fts_read"); |