File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -9,12 +9,11 @@ import {
99import { default as persistentStorage , StorageIdentifier } from '../utils/PersistentStorage'
1010import { Dispatch } from 'redux'
1111import { showError } from './Global'
12- import { promises as fsPromise } from 'fs'
1312import * as path from 'path'
1413import { ActionTypes , Action } from '../reducers/ConnectionManager'
1514import { Subscription } from '../../../backend/src/DataSource/MqttSource'
1615import { connectionsMigrator } from './migrations/Connection'
17- import { rendererRpc } from '../../../events'
16+ import { rendererRpc , readFromFile } from '../../../events'
1817import { makeOpenDialogRpc } from '../../../events/OpenDialogRequest'
1918
2019export interface ConnectionDictionary {
@@ -81,7 +80,7 @@ async function openCertificate(): Promise<CertificateParameters> {
8180 throw rejectReasons . noCertificateSelected
8281 }
8382
84- const data = await fsPromise . readFile ( selectedFile )
83+ const data = await rendererRpc . call ( readFromFile , { filePath : selectedFile } )
8584 if ( data . length > 16_384 || data . length < 64 ) {
8685 throw rejectReasons . certificateSizeDoesNotMatch
8786 }
You can’t perform that action at this time.
0 commit comments