Skip to content

Commit fd45020

Browse files
committed
Copy file once completed to avoid cross-partition link issue.
1 parent 57e48d5 commit fd45020

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/service/iplayerService.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,10 +94,10 @@ const iplayerService = {
9494
const newPath = path.join(completeDir, `${queueItem?.nzbName}.mp4`);
9595
loggingService.debug(pid, `Moving ${oldPath} to ${newPath}`);
9696

97-
fs.renameSync(oldPath, newPath);
97+
fs.copyFileSync(oldPath, newPath);
9898
}
9999

100-
// Delete the uuid directory after moving the file
100+
// Delete the uuid directory and file after moving it
101101
loggingService.debug(pid, `Deleting old directory ${uuidPath}`);
102102
fs.rmSync(uuidPath, { recursive: true, force: true });
103103

0 commit comments

Comments
 (0)