diff options
author | Jim Meyering <jim@meyering.net> | 2001-09-28 19:52:34 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2001-09-28 19:52:34 +0000 |
commit | 679295f1de76595be6c310c753f53bb6815d7125 (patch) | |
tree | 8b2093b7980baea3e85e7e5b1ea23458479fadbe | |
parent | beee918e7239537605f1100b4532189749e7d75e (diff) | |
download | coreutils-679295f1de76595be6c310c753f53bb6815d7125.tar.xz |
(do_copy): Call dest_info_init if necessary.
-rw-r--r-- | src/cp.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -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) |