mirror of
https://gitlab.com/vyla-entertainment/home.git
synced 2026-11-14 06:07:23 -05:00
Completely rewrote the code, home builds locally rather on Gitlab, releases are done manually aswell
This commit is contained in:
11
patcher.js
11
patcher.js
@@ -62,7 +62,16 @@ class Patcher {
|
||||
for (const dir of dirs) {
|
||||
const fullPath = path.join(this.appDataPath, dir);
|
||||
if (fs.existsSync(fullPath)) {
|
||||
fs.rmSync(fullPath, { recursive: true, force: true });
|
||||
try {
|
||||
fs.rmSync(fullPath, { recursive: true, force: true });
|
||||
} catch (e) {
|
||||
try {
|
||||
const trashPath = fullPath + '.trash.' + Date.now();
|
||||
fs.renameSync(fullPath, trashPath);
|
||||
} catch (renameErr) {
|
||||
console.warn(`[PATCHER] Could not remove or rename ${fullPath}. It will be overwritten.`);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user