portree_kid 2020-08-03 22:37:37 +02:00
parent 00132e46fb
commit 7c8cc0e705

View File

@ -276,6 +276,12 @@ module.exports.readPavement = function (f, icao, cb) {
store.default.dispatch('setPavementLoaded', false);
if (!fs.existsSync(f)) {
store.default.dispatch('setPavementLoaded', true);
return;
}
try {
fs.accessSync(f, fs.constants.R_OK);
lineReader.createInterface({
input: fs.createReadStream(f).pipe(zlib.createGunzip())
}).on('line', function (line) {
@ -306,6 +312,11 @@ module.exports.readPavement = function (f, icao, cb) {
console.log("End");
cb(pavementLayerGroup);
});
} catch (err) {
console.error('no access!');
store.default.dispatch('setPavementLoaded', true);
return;
}
}
module.exports.debug = false;