@lvce-editor/main-process 4.9.0 → 4.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/mainProcessMain.js +13 -10
- package/package.json +1 -1
package/dist/mainProcessMain.js
CHANGED
|
@@ -4170,6 +4170,17 @@ const handlePermissionCheck$1 = (webContents, permission, origin, details) => {
|
|
|
4170
4170
|
return isAllowed;
|
|
4171
4171
|
};
|
|
4172
4172
|
|
|
4173
|
+
const getActualPath = relative => {
|
|
4174
|
+
const actual = relative === '/' ? '/index.html' : relative;
|
|
4175
|
+
return actual;
|
|
4176
|
+
};
|
|
4177
|
+
|
|
4178
|
+
const getAbsolutePath = relative => {
|
|
4179
|
+
const actual = getActualPath(relative);
|
|
4180
|
+
const absolutePath = join$1(root, 'static', actual);
|
|
4181
|
+
return absolutePath;
|
|
4182
|
+
};
|
|
4183
|
+
|
|
4173
4184
|
const getElectronFileResponseIpc = async (url, request) => {
|
|
4174
4185
|
const {
|
|
4175
4186
|
body,
|
|
@@ -4214,15 +4225,7 @@ const getRelativePath = url => {
|
|
|
4214
4225
|
const relative = url.slice(scheme.length + 4);
|
|
4215
4226
|
return relative;
|
|
4216
4227
|
};
|
|
4217
|
-
|
|
4218
|
-
const actual = relative === '/' ? '/index.html' : relative;
|
|
4219
|
-
return actual;
|
|
4220
|
-
};
|
|
4221
|
-
const getAbsolutePath = relative => {
|
|
4222
|
-
const actual = getActualPath(relative);
|
|
4223
|
-
const absolutePath = join$1(root, 'static', actual);
|
|
4224
|
-
return absolutePath;
|
|
4225
|
-
};
|
|
4228
|
+
|
|
4226
4229
|
const getElectronFileResponseConfig = async (url, request) => {
|
|
4227
4230
|
const parsedConfig = getOrCreateConfig();
|
|
4228
4231
|
const {
|
|
@@ -4239,7 +4242,7 @@ const getElectronFileResponseConfig = async (url, request) => {
|
|
|
4239
4242
|
return getNotFoundResponse();
|
|
4240
4243
|
}
|
|
4241
4244
|
const responseHeaders = headers[match];
|
|
4242
|
-
const absolutePath = getAbsolutePath(
|
|
4245
|
+
const absolutePath = getAbsolutePath(actual);
|
|
4243
4246
|
if (!existsSync(absolutePath)) {
|
|
4244
4247
|
return getNotFoundResponse();
|
|
4245
4248
|
}
|