Skip to content

Commit 3aa93a2

Browse files
committed
fix temp
1 parent 932a633 commit 3aa93a2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Diff for: src/deluge.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,8 @@ export class Deluge implements TorrentClient {
255255
config: Partial<AddTorrentOptions> = {},
256256
): Promise<AddTorrentResponse> {
257257
let path: string;
258-
if (isUint8Array(torrent) || !torrent.startsWith('/tmp/')) {
258+
// Example temp path: /run/deluged-temp/delugeweb-s0jy917j/ubuntu-20.10-desktop-amd64.iso.torrent
259+
if (isUint8Array(torrent) || !torrent.startsWith('/tmp/') || torrent.includes('deluged-temp')) {
259260
const upload = await this.upload(torrent);
260261
if (!upload.success || !upload.files.length) {
261262
throw new Error('Failed to upload');

0 commit comments

Comments
 (0)