diff --git a/scripts/generatePmTilesExtracts.ts b/scripts/generatePmTilesExtracts.ts index dc6135a89b..af7ece37ca 100644 --- a/scripts/generatePmTilesExtracts.ts +++ b/scripts/generatePmTilesExtracts.ts @@ -41,7 +41,7 @@ class GeneratePmTilesExtracts extends Script { const boundary = 2 << (z - 1) for (let x = 0; x < boundary; x++) { console.log("Checking ", this.getFilename(z, x, boundary - 1)) - if (existsSync(this.getFilename(z, x, boundary - 1))) { + if (existsSync(this.targetDir + "/" + this.getFilename(z, x, boundary - 1))) { // Skip this column, already exists console.log("Skipping column ", x, "at zoom", z) continue