mirror of
https://github.com/Zagrios/bs-manager.git
synced 2026-07-03 14:08:25 +02:00
add protocol to support system file link
This commit is contained in:
+9
-2
@@ -9,7 +9,7 @@
|
||||
* `./src/main.js` using webpack. This gives us some performance wins.
|
||||
*/
|
||||
import path from 'path';
|
||||
import { app } from 'electron';
|
||||
import { app, protocol } from 'electron';
|
||||
import log from 'electron-log';
|
||||
import './ipcs';
|
||||
import { UtilsService } from './services/utils.service';
|
||||
@@ -62,4 +62,11 @@ app.on('window-all-closed', () => {
|
||||
|
||||
app.whenReady().then(() => {
|
||||
createWindow();
|
||||
}).catch(log.error);
|
||||
}).catch(log.error);
|
||||
|
||||
app.whenReady().then(() => {
|
||||
protocol.registerFileProtocol('file', (request, callback) => {
|
||||
const pathname = decodeURI(request.url.replace('file:///', ''));
|
||||
callback(pathname);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user