summaryrefslogtreecommitdiff
path: root/src/mv.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2001-09-28 19:53:21 +0000
committerJim Meyering <jim@meyering.net>2001-09-28 19:53:21 +0000
commit6027bfa668248920dc2c90f0529283cb73e04c92 (patch)
tree4b9794061c231f9efec0d6ba2738cf9896a7d7d4 /src/mv.c
parent679295f1de76595be6c310c753f53bb6815d7125 (diff)
downloadcoreutils-6027bfa668248920dc2c90f0529283cb73e04c92.tar.xz
(main): Call dest_info_init if necessary.
Diffstat (limited to 'src/mv.c')
-rw-r--r--src/mv.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/mv.c b/src/mv.c
index 946ae75ed..c889a4356 100644
--- a/src/mv.c
+++ b/src/mv.c
@@ -502,6 +502,13 @@ main (int argc, char **argv)
? n_files - 1
: n_files - 2);
unsigned int i;
+
+ /* 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 move. */
+ if (last_file_idx)
+ dest_info_init ();
+
for (i = 0; i <= last_file_idx; ++i)
errors |= movefile (file[i], target_directory, dest_is_dir, &x);
}