1
0
mirror of git://git.sv.gnu.org/coreutils.git synced 2026-08-05 08:10:15 +02:00

install: only attempt to create a target dir once

* src/install.c (main): As an optimization, when calling
install_file_in_dir() for each file, only attempt to create
the target directory once, as this is invariant over the loop.
This commit is contained in:
Pádraig Brady
2016-01-02 22:14:41 +00:00
parent 6c65ce4c64
commit 73055581c9
+1 -1
View File
@@ -1043,7 +1043,7 @@ main (int argc, char **argv)
dest_info_init (&x);
for (i = 0; i < n_files; i++)
if (! install_file_in_dir (file[i], target_directory, &x,
mkdir_and_install))
i == 0 && mkdir_and_install))
exit_status = EXIT_FAILURE;
}
}