From: Jim Meyering Date: Fri, 28 Sep 2001 19:52:34 +0000 (+0000) Subject: (do_copy): Call dest_info_init if necessary. X-Git-Tag: TEXTUTILS-2_0_16~23 X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=679295f1de76595be6c310c753f53bb6815d7125;p=thirdparty%2Fcoreutils.git (do_copy): Call dest_info_init if necessary. --- diff --git a/src/cp.c b/src/cp.c index e812a68894..faede5472d 100644 --- a/src/cp.c +++ b/src/cp.c @@ -482,6 +482,12 @@ do_copy (int n_files, char **file, const char *target_directory, --n_files; } + /* Initialize the hash table only if we'll need it. + The problem it is used to detect can arise only if there are + two or more files to copy. */ + if (n_files >= 2) + dest_info_init (); + if (lstat (dest, &sb)) { if (errno != ENOENT)