From: Jim Meyering Date: Fri, 28 Sep 2001 19:53:21 +0000 (+0000) Subject: (main): Call dest_info_init if necessary. X-Git-Tag: TEXTUTILS-2_0_16~22 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6027bfa668248920dc2c90f0529283cb73e04c92;p=thirdparty%2Fcoreutils.git (main): Call dest_info_init if necessary. --- 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); }