allow lists to specify base-dir segments
This commit is contained in:
@@ -112,8 +112,10 @@ class DownloadJob():
|
|||||||
@staticmethod
|
@staticmethod
|
||||||
def get_base_directory():
|
def get_base_directory():
|
||||||
"""Return the base-destination-directory for downloads"""
|
"""Return the base-destination-directory for downloads"""
|
||||||
bdir = config.get(("base-directory",), default=tempfile.gettempdir())
|
bdir = config.get(("base-directory",), default=(".", "gallery-dl"))
|
||||||
return os.path.expanduser(bdir)
|
if not isinstance(bdir, str):
|
||||||
|
bdir = os.path.join(*bdir)
|
||||||
|
return os.path.expanduser(os.path.expandvars(bdir))
|
||||||
|
|
||||||
|
|
||||||
class KeywordJob():
|
class KeywordJob():
|
||||||
|
|||||||
Reference in New Issue
Block a user