mirror of
https://github.com/MasterAcnolo/Freedom-Loader.git
synced 2026-09-27 20:11:15 +02:00
fix:
- 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:
@@ -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");
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user