From 6027bfa668248920dc2c90f0529283cb73e04c92 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Fri, 28 Sep 2001 19:53:21 +0000 Subject: [PATCH] (main): Call dest_info_init if necessary. --- src/mv.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/mv.c b/src/mv.c index 946ae75edf..c889a43560 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); } -- 2.47.3