only write last.state.txt in -diff mode

Oliver Tonnhofer 2014-08-19 16:09:12 +02:00
parent a9a50d64c4
commit 1f5763219a
1 changed files with 8 additions and 6 deletions

View File

@ -122,6 +122,7 @@ func Import() {
elementCounts = progress.Stop()
osmCache.Close()
log.StopStep(step)
if config.ImportOptions.Diff {
diffstate := state.FromPbf(pbfFile)
if diffstate != nil {
os.MkdirAll(config.BaseOptions.DiffDir, 0755)
@ -131,6 +132,7 @@ func Import() {
}
}
}
}
if config.ImportOptions.Write {
stepImport := log.StartStep("Importing OSM data")