only write last.state.txt in -diff mode
parent
a9a50d64c4
commit
1f5763219a
|
@ -122,12 +122,14 @@ func Import() {
|
||||||
elementCounts = progress.Stop()
|
elementCounts = progress.Stop()
|
||||||
osmCache.Close()
|
osmCache.Close()
|
||||||
log.StopStep(step)
|
log.StopStep(step)
|
||||||
diffstate := state.FromPbf(pbfFile)
|
if config.ImportOptions.Diff {
|
||||||
if diffstate != nil {
|
diffstate := state.FromPbf(pbfFile)
|
||||||
os.MkdirAll(config.BaseOptions.DiffDir, 0755)
|
if diffstate != nil {
|
||||||
err := diffstate.WriteToFile(path.Join(config.BaseOptions.DiffDir, "last.state.txt"))
|
os.MkdirAll(config.BaseOptions.DiffDir, 0755)
|
||||||
if err != nil {
|
err := diffstate.WriteToFile(path.Join(config.BaseOptions.DiffDir, "last.state.txt"))
|
||||||
log.Print("error writing last.state.txt: ", err)
|
if err != nil {
|
||||||
|
log.Print("error writing last.state.txt: ", err)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue