summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/cp.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/cp.c b/src/cp.c
index 5b14f3a7b..3d00b5f7f 100644
--- a/src/cp.c
+++ b/src/cp.c
@@ -604,6 +604,8 @@ do_copy (int n_files, char **file, const char *target_directory,
error (0, 0, _("extra operand %s"), quote (file[2]));
usage (EXIT_FAILURE);
}
+ /* Update NEW_DST and SB, which may be checked below. */
+ ignore_value (target_directory_operand (file[n_files -1], &sb, &new_dst));
}
else if (!target_directory)
{