mirror of
https://github.com/felt/tippecanoe.git
synced 2026-10-05 09:55:41 +02:00
Complain if the output file or directory is specified more than once
This commit is contained in:
@@ -2293,10 +2293,26 @@ int main(int argc, char **argv) {
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 'o':
|
case 'o':
|
||||||
|
if (out_mbtiles != NULL) {
|
||||||
|
fprintf(stderr, "%s: Can't specify both %s and %s as output\n", argv[0], out_mbtiles, optarg);
|
||||||
|
exit(EXIT_FAILURE);
|
||||||
|
}
|
||||||
|
if (out_directory != NULL) {
|
||||||
|
fprintf(stderr, "%s: Can't specify both %s and %s as output\n", argv[0], out_directory, optarg);
|
||||||
|
exit(EXIT_FAILURE);
|
||||||
|
}
|
||||||
out_mbtiles = optarg;
|
out_mbtiles = optarg;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'e':
|
case 'e':
|
||||||
|
if (out_mbtiles != NULL) {
|
||||||
|
fprintf(stderr, "%s: Can't specify both %s and %s as output\n", argv[0], out_mbtiles, optarg);
|
||||||
|
exit(EXIT_FAILURE);
|
||||||
|
}
|
||||||
|
if (out_directory != NULL) {
|
||||||
|
fprintf(stderr, "%s: Can't specify both %s and %s as output\n", argv[0], out_directory, optarg);
|
||||||
|
exit(EXIT_FAILURE);
|
||||||
|
}
|
||||||
out_directory = optarg;
|
out_directory = optarg;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user