improved get_base_directory
This commit is contained in:
@@ -8,6 +8,7 @@
|
|||||||
|
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
import tempfile
|
||||||
from . import config, extractor, downloader, text
|
from . import config, extractor, downloader, text
|
||||||
from .extractor.message import Message
|
from .extractor.message import Message
|
||||||
|
|
||||||
@@ -109,7 +110,8 @@ 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"""
|
||||||
return config.get(("base-directory",), default="/tmp/")
|
bdir = config.get(("base-directory",), default=tempfile.gettempdir())
|
||||||
|
return os.path.expanduser(bdir)
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def print_start(path):
|
def print_start(path):
|
||||||
|
|||||||
Reference in New Issue
Block a user