Fix a bug in the UI importer that happens the first time you run it. #523

This commit is contained in:
Dustin Carlino 2021-03-20 16:31:31 -07:00
parent ca70d7c617
commit 01431827dd

View File

@ -49,7 +49,9 @@ async fn main() -> Result<()> {
.arg("boundary0.poly") .arg("boundary0.poly")
.output()?; .output()?;
assert!(out.status.success()); assert!(out.status.success());
String::from_utf8(out.stdout)? // pick_geofabrik might output extra lines while downloading the index. Grab the last line.
let output = String::from_utf8(out.stdout)?;
output.trim().split("\n").last().unwrap().trim().to_string()
}; };
// Name the temporary map based on the Geofabrik region. // Name the temporary map based on the Geofabrik region.