From 9fd4da4f7dac59699d15972856edf33463544307 Mon Sep 17 00:00:00 2001 From: Eric Fischer Date: Thu, 18 Sep 2014 14:04:52 -0700 Subject: [PATCH] Unlink tmp files early in case the tiling doesn't run to completion --- geojson.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/geojson.c b/geojson.c index abd2b96..5be02dc 100644 --- a/geojson.c +++ b/geojson.c @@ -407,6 +407,9 @@ void read_json(FILE *f) { FILE *indexfile = fopen(indexname, "wb"); long long fpos = 0; + unlink(metaname); + unlink(indexname); + unsigned file_bbox[] = { UINT_MAX, UINT_MAX, 0, 0 }; while (1) { @@ -561,9 +564,6 @@ next_feature: close(indexfd); close(metafd); - - unlink(metaname); - unlink(indexname); } int main(int argc, char **argv) {