- replace unusued throw new Error by logger.error
- remove unusued variables isWindows, err
- remove unusued logFormat
- remove unusued imports logSessionEnd
This commit is contained in:
MasterAcnolo
2026-09-09 09:21:11 +02:00
parent e2c2dde4a2
commit e541eb442a
7 changed files with 7 additions and 12 deletions

View File

@@ -102,7 +102,7 @@ function startRPC() {
});
rpc.login({ clientId }).catch(err => {
rpc.login({ clientId }).catch(() => {
// Since 1.6.2, it no longer print the error. This is because if discord is not opened, it will send an error.
// logger.error("Unable to connect to the RPC:", err);
logger.info("Unable to connect to the Discord RPC. Discord is maybe not launched");

View File

@@ -66,7 +66,7 @@ function validateDownloadPath(userPath) {
const real = fs.realpathSync(absolutePath);
if (!isSafePath(real)) {
throw new Error("Path not allowed: system folders are blocked!");
logger.error("Path not allowed: system folders are blocked!");
}
return real;