This commit is contained in:
parent
00132e46fb
commit
7c8cc0e705
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user