Compare commits
No commits in common. "26edc797841610f5ac24688f7047e3cf53c9bbc6" and "f44a321e747fffaff95ef1bd062fc95e07100e0c" have entirely different histories.
26edc79784
...
f44a321e74
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "real-debrid-downloader",
|
"name": "real-debrid-downloader",
|
||||||
"version": "1.7.133",
|
"version": "1.7.132",
|
||||||
"description": "Desktop downloader",
|
"description": "Desktop downloader",
|
||||||
"main": "build/main/main/main.js",
|
"main": "build/main/main/main.js",
|
||||||
"author": "Sucukdeluxe",
|
"author": "Sucukdeluxe",
|
||||||
|
|||||||
@ -136,11 +136,7 @@ function createTray(): void {
|
|||||||
const iconPath = path.join(app.getAppPath(), "assets", "app_icon.ico");
|
const iconPath = path.join(app.getAppPath(), "assets", "app_icon.ico");
|
||||||
try {
|
try {
|
||||||
tray = new Tray(iconPath);
|
tray = new Tray(iconPath);
|
||||||
} catch (error) {
|
} catch {
|
||||||
// Fails on headless servers / Windows Service / RDP-disconnected sessions.
|
|
||||||
// Log so a user running on a non-Administrator/headless server can see
|
|
||||||
// why minimize-to-tray doesn't work, instead of getting an inaccessible window.
|
|
||||||
logger.warn(`Tray-Icon konnte nicht erstellt werden (Headless/RDP/Service?): ${String(error)} - Minimize-to-Tray steht nicht zur Verfuegung, Fenster bleibt sichtbar.`);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
tray.setToolTip(APP_NAME);
|
tray.setToolTip(APP_NAME);
|
||||||
|
|||||||
@ -530,15 +530,7 @@ export function createStoragePaths(baseDir: string): StoragePaths {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function ensureBaseDir(baseDir: string): void {
|
function ensureBaseDir(baseDir: string): void {
|
||||||
try {
|
|
||||||
fs.mkdirSync(baseDir, { recursive: true });
|
fs.mkdirSync(baseDir, { recursive: true });
|
||||||
} catch (error) {
|
|
||||||
const code = (error as NodeJS.ErrnoException)?.code || "";
|
|
||||||
if (code === "EACCES" || code === "EPERM") {
|
|
||||||
logger.error(`AppData-Ordner kann nicht erstellt werden (${code}): ${baseDir} - pruefe Schreibrechte fuer Benutzer ${process.env.USERNAME || process.env.USER || "?"}`);
|
|
||||||
}
|
|
||||||
throw error;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** JSON replacer that sanitizes NaN/Infinity to null to prevent file corruption. */
|
/** JSON replacer that sanitizes NaN/Infinity to null to prevent file corruption. */
|
||||||
@ -564,18 +556,7 @@ function readSettingsFile(filePath: string): AppSettings | null {
|
|||||||
...parsed
|
...parsed
|
||||||
});
|
});
|
||||||
return sanitizeCredentialPersistence(merged);
|
return sanitizeCredentialPersistence(merged);
|
||||||
} catch (error) {
|
} catch {
|
||||||
// Distinguish permission/access errors from missing/corrupt JSON so a
|
|
||||||
// misconfigured server (e.g. unusual user, restricted AppData) shows a
|
|
||||||
// clear log entry instead of silently falling back to defaults.
|
|
||||||
const code = (error as NodeJS.ErrnoException)?.code || "";
|
|
||||||
if (code === "ENOENT") {
|
|
||||||
// file doesn't exist — normal on first run
|
|
||||||
} else if (code === "EACCES" || code === "EPERM") {
|
|
||||||
logger.error(`Settings-Datei nicht zugreifbar (${code}): ${filePath} - pruefe Datei-/Ordner-Berechtigungen fuer Benutzer ${process.env.USERNAME || process.env.USER || "?"}`);
|
|
||||||
} else {
|
|
||||||
logger.warn(`Settings-Datei nicht lesbar: ${filePath}: ${String(error)}`);
|
|
||||||
}
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -826,12 +807,7 @@ function readSessionFile(filePath: string): SessionState | null {
|
|||||||
logger.info(`Session geladen: ${filePath} (${pkgCount} Pakete, ${itemCount} Items)`);
|
logger.info(`Session geladen: ${filePath} (${pkgCount} Pakete, ${itemCount} Items)`);
|
||||||
return session;
|
return session;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
const code = (error as NodeJS.ErrnoException)?.code || "";
|
|
||||||
if (code === "EACCES" || code === "EPERM") {
|
|
||||||
logger.error(`Session-Datei nicht zugreifbar (${code}): ${filePath} - pruefe Datei-/Ordner-Berechtigungen fuer Benutzer ${process.env.USERNAME || process.env.USER || "?"}`);
|
|
||||||
} else {
|
|
||||||
logger.error(`Session-Datei nicht lesbar: ${filePath}: ${String(error)}`);
|
logger.error(`Session-Datei nicht lesbar: ${filePath}: ${String(error)}`);
|
||||||
}
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user