From da9c89d762ee4f7275d713d2b0191c30e53898d9 Mon Sep 17 00:00:00 2001 From: portree_kid Date: Sun, 3 May 2020 09:48:53 +0200 Subject: [PATCH] Backupfile --- src/renderer/loaders/groundnet_writer.js | 4 ++++ 1 file changed, 4 insertions(+) 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;