Skip to content

Commit 08c2a2c

Browse files
authored
Merge pull request #68 from locolocoer/main
bugfix: httpstohttp path error in windows
2 parents 5d124c7 + f0b420f commit 08c2a2c

File tree

2 files changed

+35
-2
lines changed

2 files changed

+35
-2
lines changed

.github/workflows/webpack.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: NodeJS with Webpack
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
pull_request:
7+
branches: [ "main" ]
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
13+
strategy:
14+
matrix:
15+
node-version: [18.8.0]
16+
17+
steps:
18+
- uses: actions/checkout@v4
19+
20+
- name: Use Node.js ${{ matrix.node-version }}
21+
uses: actions/setup-node@v4
22+
with:
23+
node-version: ${{ matrix.node-version }}
24+
25+
- name: Build
26+
run: |
27+
npm install
28+
npx run release

src/views/proxy/index.vue

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -565,14 +565,19 @@ const handleRandomProxyName = () => {
565565
`df_${editForm.value.type}_${result}`.toLocaleLowerCase();
566566
};
567567
568+
import path from "path";
569+
function normalizePath(filePath: string) {
570+
return path.normalize(filePath).replace(/\\/g, "/");
571+
}
572+
568573
const handleSelectFile = (type: number, ext: string[]) => {
569574
ipcRenderer.invoke("file.selectFile", ext).then(r => {
570575
switch (type) {
571576
case 1:
572-
editForm.value.https2httpCaFile = r[0];
577+
editForm.value.https2httpCaFile = normalizePath(r[0]);
573578
break;
574579
case 2:
575-
editForm.value.https2httpKeyFile = r[0];
580+
editForm.value.https2httpKeyFile = normalizePath(r[0]);
576581
break;
577582
}
578583
console.log(r);

0 commit comments

Comments
 (0)