mirror of
https://github.com/mapbox/tippecanoe.git
synced 2025-03-28 06:28:35 +00:00
Complain if the output file or directory is specified more than once
This commit is contained in:
parent
3eb1237b0a
commit
ba82ef8274
16
main.cpp
16
main.cpp
@ -2293,10 +2293,26 @@ int main(int argc, char **argv) {
|
||||
break;
|
||||
|
||||
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;
|
||||
break;
|
||||
|
||||
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;
|
||||
break;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user