fix issue when incomplete download directory doesn't exist. fixes #1306

This commit is contained in:
clinton-hall 2017-12-25 16:31:20 +13:00
commit 70e2f5c46d

View file

@ -148,7 +148,9 @@ def par2(dirname):
newlist = []
sofar = 0
parfile = ""
objects = os.listdir(dirname)
objects = []
if os.path.exists(dirname):
objects = os.listdir(dirname)
for item in objects:
if item.endswith(".par2"):
size = os.path.getsize(os.path.join(dirname, item))