change default path of queue persistence files (closes #110)

This commit is contained in:
Alex Shnitman
2022-01-26 08:25:53 +02:00
parent 47da14781b
commit 7b94a4fabd
3 changed files with 7 additions and 6 deletions

View File

@@ -136,9 +136,12 @@ class Download:
class PersistentQueue:
def __init__(self, path):
self.path = path
pdir = os.path.dirname(path)
if not os.path.isdir(pdir):
os.mkdir(pdir)
with shelve.open(path, 'c'):
pass
self.path = path
self.dict = OrderedDict()
def load(self):