diff --git a/src/renderer/loaders/groundnet_writer.js b/src/renderer/loaders/groundnet_writer.js index 1ce5369..8177b43 100644 --- a/src/renderer/loaders/groundnet_writer.js +++ b/src/renderer/loaders/groundnet_writer.js @@ -56,7 +56,11 @@ function walkPushbackRoute (index, walkedNodes, pushBackNodes) { exports.writeGroundnetXML = function (fDir, icao, featureList) { try { var f = path.join(fDir, icao[0], icao[1], icao[2], icao + '.groundnet.new.xml'); + var fBak = path.join(fDir, icao[0], icao[1], icao[2], icao + '.groundnet.bak.xml'); + if( fs.existsSync(f) ) { + fs.copyFileSync(f, fBak); + } if (f == null) return;