Skip to content

Commit af54ce4

Browse files
committed
fix: fix folder lose
1 parent 946830d commit af54ce4

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/main/config/StaticPath.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// 这里定义了静态文件路径的位置
22
import { join } from "path";
3-
import config from "@config/index";
3+
import { HotUpdateFolder } from "./const";
44
import { app } from "electron";
55
import { URL } from "url";
66
const isDev = process.env.NODE_ENV === "development";
@@ -9,7 +9,7 @@ class StaticPath {
99
const basePath = isDev
1010
? join(__dirname, "..", "..", "..")
1111
: join(app.getAppPath(), "..", "..");
12-
this.__updateFolder = join(basePath, `${config.HotUpdateFolder}`);
12+
this.__updateFolder = join(basePath, `${HotUpdateFolder}`);
1313
if (isDev) {
1414
this.__static = join(basePath, "public");
1515
this.__lib = join(

src/main/config/const.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@ export const hotPublishUrl: string =
66
export const hotPublishConfigName: string = "update-config";
77
export const openDevTools: boolean = false;
88
export const DisableF12: boolean = true;
9+
export const HotUpdateFolder: string = "hot-update";

0 commit comments

Comments
 (0)