Lines 365-372
main(int argc, char* argv[])
Link Here
|
365 |
|
365 |
|
366 |
if (!opts_target_directory) { |
366 |
if (!opts_target_directory) { |
367 |
target = argv[last]; |
367 |
target = argv[last]; |
368 |
if (stat(target, &s) != 0) |
368 |
if (stat(target, &s) != 0) { |
|
|
369 |
err(1, "failed to stat %s", target); |
369 |
return EXIT_FAILURE; |
370 |
return EXIT_FAILURE; |
|
|
371 |
} |
370 |
target_is_directory = S_ISDIR(s.st_mode); |
372 |
target_is_directory = S_ISDIR(s.st_mode); |
371 |
} else { |
373 |
} else { |
372 |
/* target was set above with the -t option */ |
374 |
/* target was set above with the -t option */ |
Lines 381-388
main(int argc, char* argv[])
Link Here
|
381 |
last++; |
383 |
last++; |
382 |
|
384 |
|
383 |
for (i = first; i < last; i++) { |
385 |
for (i = first; i < last; i++) { |
384 |
if (stat(argv[i], &s) != 0) |
386 |
if (stat(argv[i], &s) != 0) { |
|
|
387 |
err(1, "failed to stat %s", argv[i]); |
385 |
return EXIT_FAILURE; |
388 |
return EXIT_FAILURE; |
|
|
389 |
} |
386 |
/* We reproduce install's behavior and skip |
390 |
/* We reproduce install's behavior and skip |
387 |
* all extra directories on the command line |
391 |
* all extra directories on the command line |
388 |
* that are not the final target directory. |
392 |
* that are not the final target directory. |