Merge pull request #68 from locolocoer/main
bugfix: httpstohttp path error in windows
This commit is contained in:
commit
08c2a2cb5a
28
.github/workflows/webpack.yml
vendored
Normal file
28
.github/workflows/webpack.yml
vendored
Normal file
@ -0,0 +1,28 @@
|
||||
name: NodeJS with Webpack
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "main" ]
|
||||
pull_request:
|
||||
branches: [ "main" ]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
node-version: [18.8.0]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
npm install
|
||||
npx run release
|
@ -565,14 +565,19 @@ const handleRandomProxyName = () => {
|
||||
`df_${editForm.value.type}_${result}`.toLocaleLowerCase();
|
||||
};
|
||||
|
||||
import path from "path";
|
||||
function normalizePath(filePath: string) {
|
||||
return path.normalize(filePath).replace(/\\/g, "/");
|
||||
}
|
||||
|
||||
const handleSelectFile = (type: number, ext: string[]) => {
|
||||
ipcRenderer.invoke("file.selectFile", ext).then(r => {
|
||||
switch (type) {
|
||||
case 1:
|
||||
editForm.value.https2httpCaFile = r[0];
|
||||
editForm.value.https2httpCaFile = normalizePath(r[0]);
|
||||
break;
|
||||
case 2:
|
||||
editForm.value.https2httpKeyFile = r[0];
|
||||
editForm.value.https2httpKeyFile = normalizePath(r[0]);
|
||||
break;
|
||||
}
|
||||
console.log(r);
|
||||
|
Loading…
Reference in New Issue
Block a user