projects
/
platform
/
upstream
/
coreutils.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
beee918
)
(do_copy): Call dest_info_init if necessary.
author
Jim Meyering
<jim@meyering.net>
Fri, 28 Sep 2001 19:52:34 +0000
(19:52 +0000)
committer
Jim Meyering
<jim@meyering.net>
Fri, 28 Sep 2001 19:52:34 +0000
(19:52 +0000)
src/cp.c
patch
|
blob
|
history
diff --git
a/src/cp.c
b/src/cp.c
index
e812a68
..
faede54
100644
(file)
--- 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)