Use fs-plus instead of fs in AtomProtocolHandler

This commit fixes some deprecation warnings we were observing in our 
test suite, as well as when opening packages that registered protocol 
handlers such as the `welcome` package.

The warnings were due to using the `fs.(l)statSyncNoException` API, 
which will be deprecated from Electron 4 onwards. We had already dealt 
with this by shipping https://github.com/atom/fs-plus/pull/46, which 
provided a shim on `fs-plus` to suppress the warning. However, 
`AtomProtocolHandler` was still using the standard `fs` module, which 
was causing the warning to be displayed whenever a package registered a 
URL opener.
This commit is contained in:
Antonio Scandurra
2019-05-20 18:03:14 +02:00
parent dc39210cc2
commit 52631bab98

View File

@@ -1,5 +1,5 @@
const {protocol} = require('electron')
const fs = require('fs')
const fs = require('fs-plus')
const path = require('path')
// Handles requests with 'atom' protocol.