Compare commits

..

No commits in common. "dadc2d1b5714f9663462389cdc3e06271b29255c" and "31a579f07c5e65fe12fa67ef8b6cfcea14fe78b0" have entirely different histories.

2 changed files with 2 additions and 5 deletions

View File

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

View File

@ -3942,10 +3942,7 @@ export class DownloadManager extends EventEmitter {
const owner = this.reservedTargetPaths.get(key);
const existsOnDisk = fs.existsSync(candidate);
const allowExistingCandidate = allowExistingFile && index === 0;
// If file exists on disk but no other item has reserved this path, allow overwrite.
// This prevents "(1)" suffixes after app restart when partial downloads remain on disk.
const unclaimedOnDisk = existsOnDisk && !owner && index === 0;
if ((!owner || owner === itemId) && (owner === itemId || !existsOnDisk || allowExistingCandidate || unclaimedOnDisk)) {
if ((!owner || owner === itemId) && (owner === itemId || !existsOnDisk || allowExistingCandidate)) {
this.reservedTargetPaths.set(key, itemId);
this.claimedTargetPathByItem.set(itemId, candidate);
return candidate;