diff options
| author | Denys Vlasenko <vda.linux@googlemail.com> | 2016-07-14 20:58:39 +0200 |
|---|---|---|
| committer | Denys Vlasenko <vda.linux@googlemail.com> | 2016-07-14 20:58:39 +0200 |
| commit | ca003385f1e32646c249dfcd3717afbe7535dcec (patch) | |
| tree | 07f6a8772793f015a2f5e14b15ed11c1cf0635a3 | |
| parent | 2a4d7f44a415c5c4ce59ea9cd6bf276b8f75d8f7 (diff) | |
| download | busybox-w32-ca003385f1e32646c249dfcd3717afbe7535dcec.tar.gz busybox-w32-ca003385f1e32646c249dfcd3717afbe7535dcec.tar.bz2 busybox-w32-ca003385f1e32646c249dfcd3717afbe7535dcec.zip | |
cp: make verbose cp show symlink copies too
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| -rw-r--r-- | libbb/copy_file.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libbb/copy_file.c b/libbb/copy_file.c index 23bcf2e82..7801b58c7 100644 --- a/libbb/copy_file.c +++ b/libbb/copy_file.c | |||
| @@ -375,7 +375,7 @@ int FAST_FUNC copy_file(const char *source, const char *dest, int flags) | |||
| 375 | } | 375 | } |
| 376 | /* _Not_ jumping to preserve_mode_ugid_time: | 376 | /* _Not_ jumping to preserve_mode_ugid_time: |
| 377 | * symlinks don't have those */ | 377 | * symlinks don't have those */ |
| 378 | return 0; | 378 | goto verb_and_exit; |
| 379 | } | 379 | } |
| 380 | if (S_ISBLK(source_stat.st_mode) || S_ISCHR(source_stat.st_mode) | 380 | if (S_ISBLK(source_stat.st_mode) || S_ISCHR(source_stat.st_mode) |
| 381 | || S_ISSOCK(source_stat.st_mode) || S_ISFIFO(source_stat.st_mode) | 381 | || S_ISSOCK(source_stat.st_mode) || S_ISFIFO(source_stat.st_mode) |
| @@ -410,6 +410,7 @@ int FAST_FUNC copy_file(const char *source, const char *dest, int flags) | |||
| 410 | bb_perror_msg("can't preserve %s of '%s'", "permissions", dest); | 410 | bb_perror_msg("can't preserve %s of '%s'", "permissions", dest); |
| 411 | } | 411 | } |
| 412 | 412 | ||
| 413 | verb_and_exit: | ||
| 413 | if (flags & FILEUTILS_VERBOSE) { | 414 | if (flags & FILEUTILS_VERBOSE) { |
| 414 | printf("'%s' -> '%s'\n", source, dest); | 415 | printf("'%s' -> '%s'\n", source, dest); |
| 415 | } | 416 | } |
