From 52631bab98becc59754fdfd5a491a5feb38243ff Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Mon, 20 May 2019 18:03:14 +0200 Subject: [PATCH] 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. --- src/main-process/atom-protocol-handler.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main-process/atom-protocol-handler.js b/src/main-process/atom-protocol-handler.js index 47c3da14f..7c870bc1a 100644 --- a/src/main-process/atom-protocol-handler.js +++ b/src/main-process/atom-protocol-handler.js @@ -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.