suport win

This commit is contained in:
muwoo
2021-07-30 18:01:54 +08:00
parent f0b9cb2f5d
commit dade771985
5 changed files with 20 additions and 11 deletions

View File

@@ -22,7 +22,7 @@ function getQueryVariable(variable) {
if (location.href.indexOf('targetFile') > -1) {
filePath = decodeURIComponent(getQueryVariable('targetFile'));
} else {
filePath = location.pathname.replace('file://', '');
filePath = process.platform === 'win32' ? location.pathname.split(':')[1] : location.pathname.replace('file://', '');
}
const {ipcRenderer, nativeImage, clipboard, remote, shell} = require('electron');