Compare commits

..

2 Commits

Author SHA1 Message Date
Sucukdeluxe
3e2d70485c Release v1.6.96 2026-03-07 00:21:40 +01:00
Sucukdeluxe
3287504618 Fix invalid path when package name contains forward slash
sanitizeFilename() is now applied before constructing outputDir and
extractDir, so names like "TMSF/4SF" no longer produce broken Windows paths.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-07 00:21:14 +01:00
2 changed files with 5 additions and 4 deletions

View File

@ -1,6 +1,6 @@
{
"name": "real-debrid-downloader",
"version": "1.6.95",
"version": "1.6.96",
"description": "Desktop downloader",
"main": "build/main/main/main.js",
"author": "Sucukdeluxe",

View File

@ -1477,12 +1477,13 @@ export class DownloadManager extends EventEmitter {
continue;
}
const packageId = uuidv4();
const outputDir = ensureDirPath(this.settings.outputDir, pkg.name);
const safeName = sanitizeFilename(pkg.name);
const outputDir = ensureDirPath(this.settings.outputDir, safeName);
const extractBase = this.settings.extractDir || path.join(this.settings.outputDir, "_entpackt");
const extractDir = this.settings.createExtractSubfolder ? ensureDirPath(extractBase, pkg.name) : extractBase;
const extractDir = this.settings.createExtractSubfolder ? ensureDirPath(extractBase, safeName) : extractBase;
const packageEntry: PackageEntry = {
id: packageId,
name: sanitizeFilename(pkg.name),
name: safeName,
outputDir,
extractDir,
status: "queued",