mirror of
https://github.com/YuJunZhiXue/dsh-purge.git
synced 2026-11-28 07:50:22 +08:00
fix: 发布 1.1.22,官方桌面 app.asar 还在时应用不再 ENOENT
归档还在时改写真实 resources/app;没有归档时仍用 node:fs。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
4538da436d
commit
58c950ae65
10 files changed
+153
-50
No files matched your search
+5
-3
@@ -1,5 +1,3 @@
|
||||
import { promises as fsp } from "node:fs";
|
||||
import fs from "node:fs";
|
||||
import os from "node:os";
|
||||
import path from "node:path";
|
||||
import { createHash } from "node:crypto";
|
||||
@@ -13,10 +11,14 @@ import {
|
||||
revertHideConsoleFromBin,
|
||||
} from "./hide-console.js";
|
||||
import * as desktop from "./desktop.js";
|
||||
import { asarArchiveIsFile, extractAsar, overlayAsarUnpacked, renameAsarAside } from "./extract-asar.js";
|
||||
import { asarArchiveIsFile, extractAsar, hostFs, overlayAsarUnpacked, renameAsarAside } from "./extract-asar.js";
|
||||
import { adapterFor, detectSurface } from "./surface.js";
|
||||
import { openSlot } from "./table-read.js";
|
||||
|
||||
// 无归档时用 node:fs;app.asar 还在时改写真实的 resources/app,避免新建文件 ENOENT。
|
||||
const fs = hostFs;
|
||||
const fsp = hostFs.promises;
|
||||
|
||||
const isWindows = process.platform === "win32";
|
||||
const SHIM_NAMES = ["dsh.cmd", "dsh.ps1", "dsh"];
|
||||
const HIDDEN_EXEC = {
|
||||
|
||||
Reference in new issue
Block a user