summaryrefslogtreecommitdiff
path: root/src/cp.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2001-11-22 19:49:01 +0000
committerJim Meyering <jim@meyering.net>2001-11-22 19:49:01 +0000
commit669102ec611154c0228858b69c33dd57dc0d1b62 (patch)
treeb2c9d2899d294e2c2258c0d0c30b0ce74f25f0a3 /src/cp.c
parenta2e185c904c677c2d3eebcc8dd8894ec140f7ff0 (diff)
downloadcoreutils-669102ec611154c0228858b69c33dd57dc0d1b62.tar.xz
(cp_option_init): Likewise.
(do_copy): Call src_info_init.
Diffstat (limited to 'src/cp.c')
-rw-r--r--src/cp.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/cp.c b/src/cp.c
index a99de4ac1..5ef654200 100644
--- a/src/cp.c
+++ b/src/cp.c
@@ -489,11 +489,14 @@ 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. */
+ /* Initialize these hash tables only if we'll need them.
+ The problems they're used to detect can arise only if
+ there are two or more files to copy. */
if (n_files >= 2)
- dest_info_init (x);
+ {
+ dest_info_init (x);
+ src_info_init (x);
+ }
if (lstat (dest, &sb))
{
@@ -727,6 +730,7 @@ cp_option_init (struct cp_options *x)
x->update = 0;
x->verbose = 0;
x->dest_info = NULL;
+ x->src_info = NULL;
}
/* Given a string, ARG, containing a comma-separated list of arguments