mirror of
https://git.savannah.gnu.org/git/coreutils.git
synced 2026-11-17 18:02:09 +03:00
don't compute isdir() of -- or an option string
This commit is contained in:
1 parent
b221905959
commit
a374a307c5
1 file changed
+7
-3
@@ -438,10 +438,14 @@ main (int argc, char **argv)
|
||||
file = argv + optind;
|
||||
|
||||
target_directory_specified = (target_directory != NULL);
|
||||
if (!target_directory)
|
||||
target_directory = file[n_files - 1];
|
||||
if (target_directory == NULL)
|
||||
{
|
||||
/* Be careful below. When n_files is 0, this value will be
|
||||
argv[0], `--', or an option string. */
|
||||
target_directory = file[n_files - 1];
|
||||
}
|
||||
|
||||
dest_is_dir = isdir (target_directory);
|
||||
dest_is_dir = (n_files > 0 && isdir (target_directory));
|
||||
|
||||
if (target_directory_specified)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user