Skip to content

Commit c2e9a6b

Browse files
committed
fix NZB archives containing their own NZB file (with the same name) hanging
hellanzb fixes #425
1 parent ff440c6 commit c2e9a6b

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

CHANGELOG

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
v0.14:
22

3+
o Fix NZB archives containing their own NZB file (with the same name)
4+
hanging hellanzb
5+
36
o Quiet warnings on Python 2.6.
47

58
o Now strips whitespace from NZB data, fixes slow downloads on some
@@ -19,7 +22,7 @@ o Fixed defunct post processor processes on Solaris (Thanks andy at
1922
stormsail)
2023

2124
o Fixed a stall towards the end of a download situation when using
22-
multiple servers pools:
25+
multiple servers pools:
2326

2427
When one server pool couldn't establish any connections to the server
2528
and had queued segments particular to that pool (either during

Hellanzb/Daemon.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -353,9 +353,13 @@ def handleNZBDone(nzb):
353353
move(Hellanzb.WORKING_DIR, processingDir)
354354
nzb.destDir = processingDir
355355
nzb.archiveDir = processingDir
356-
357-
move(nzb.nzbFileName, processingDir)
358-
nzb.nzbFileName = os.path.join(processingDir, nzb.nzbFileName)
356+
357+
nzbFileName = os.path.join(processingDir, os.path.basename(nzb.nzbFileName))
358+
# We may have downloaded an NZB file of the same name:
359+
# http://hellanzb.com/trac/hellanzb/ticket/425
360+
hellaRename(nzbFileName)
361+
move(nzb.nzbFileName, nzbFileName)
362+
nzb.nzbFileName = nzbFileName
359363

360364
os.mkdir(Hellanzb.WORKING_DIR)
361365

0 commit comments

Comments
 (0)