Compare commits
2 Commits
705e47a1b8
...
3570582c6b
Author | SHA1 | Date | |
---|---|---|---|
3570582c6b | |||
b9bd87c099 |
@ -224,6 +224,11 @@ function downloadUpdateFiles(osuPath, updateFiles) {
|
||||
});
|
||||
});
|
||||
try {
|
||||
if (fs.existsSync(path.join(osuPath, fileName))) {
|
||||
await fs.promises.rm(path.join(osuPath, fileName), {
|
||||
force: true,
|
||||
});
|
||||
}
|
||||
await fs.promises.writeFile(
|
||||
path.join(osuPath, fileName),
|
||||
axiosDownloadWithProgress.data,
|
||||
@ -298,6 +303,11 @@ function downloadPatcherUpdates(osuPath, patcherUpdates) {
|
||||
});
|
||||
|
||||
try {
|
||||
if (fs.existsSync(path.join(osuPath, "EZPPLauncher", fileName))) {
|
||||
await fs.promises.rm(path.join(osuPath, "EZPPLauncher", fileName), {
|
||||
force: true,
|
||||
});
|
||||
}
|
||||
await fs.promises.writeFile(
|
||||
path.join(osuPath, "EZPPLauncher", fileName),
|
||||
axiosDownloadWithProgress.data,
|
||||
@ -362,6 +372,12 @@ function downloadUIFiles(osuPath, uiFiles) {
|
||||
},
|
||||
});
|
||||
try {
|
||||
if (fs.existsSync(path.join(osuPath, "EZPPLauncher", fileName))) {
|
||||
await fs.promises.rm(path.join(osuPath, "EZPPLauncher", fileName), {
|
||||
force: true,
|
||||
});
|
||||
}
|
||||
|
||||
await fs.promises.writeFile(
|
||||
path.join(osuPath, "EZPPLauncher", fileName),
|
||||
axiosDownloadWithProgress.data,
|
||||
|
6
main.js
6
main.js
@ -361,7 +361,7 @@ function registerIPCPipes() {
|
||||
mainWindow.webContents.send("ezpplauncher:alert", {
|
||||
type: "error",
|
||||
message:
|
||||
`Failed to download/replace ${filename}!\nMaybe try to rerun the Launcher as Admin.`,
|
||||
`Failed to download/replace ${filename}!\nMaybe try to restart EZPPLauncher.`,
|
||||
});
|
||||
});
|
||||
uiDownloader.eventEmitter.on("data", (data) => {
|
||||
@ -392,7 +392,7 @@ function registerIPCPipes() {
|
||||
mainWindow.webContents.send("ezpplauncher:alert", {
|
||||
type: "error",
|
||||
message:
|
||||
`Failed to download/replace ${filename}!\nMaybe try to rerun the Launcher as Admin.`,
|
||||
`Failed to download/replace ${filename}!\nMaybe try to restart EZPPLauncher.`,
|
||||
});
|
||||
});
|
||||
updateDownloader.eventEmitter.on("data", (data) => {
|
||||
@ -439,7 +439,7 @@ function registerIPCPipes() {
|
||||
mainWindow.webContents.send("ezpplauncher:alert", {
|
||||
type: "error",
|
||||
message:
|
||||
`Failed to download/replace ${filename}!\nMaybe try to rerun the Launcher as Admin.`,
|
||||
`Failed to download/replace ${filename}!\nMaybe try to restart EZPPLauncher.`,
|
||||
});
|
||||
});
|
||||
patcherDownloader.eventEmitter.on("data", (data) => {
|
||||
|
@ -17,7 +17,6 @@
|
||||
"electron/**/*"
|
||||
],
|
||||
"win": {
|
||||
"requestedExecutionLevel": "requireAdministrator",
|
||||
"target": [
|
||||
"portable"
|
||||
]
|
||||
|
Loading…
x
Reference in New Issue
Block a user