mirror of
https://github.com/fergalmoran/picard.git
synced 2026-01-04 15:43:58 +00:00
PICARD-118: Set cache location to portable config dir
This commit is contained in:
committed by
Philipp Wolfer
parent
02cf4cddc0
commit
ebfd17574a
@@ -12,8 +12,7 @@ import picard.const
|
||||
# The portable version stores all data in a folder beside the executable
|
||||
configdir = '{}-{}'.format(PICARD_ORG_NAME, PICARD_APP_NAME)
|
||||
basedir = os.path.join(os.path.dirname(sys.executable), configdir)
|
||||
if not os.path.exists(basedir):
|
||||
os.makedirs(basedir)
|
||||
os.makedirs(basedir, exist_ok=True)
|
||||
|
||||
# Setup config file if not specified as command line argument
|
||||
if '--config-file' not in sys.argv and '-c' not in sys.argv:
|
||||
@@ -22,3 +21,8 @@ if '--config-file' not in sys.argv and '-c' not in sys.argv:
|
||||
|
||||
# Setup plugin folder
|
||||
picard.const.USER_PLUGIN_DIR = os.path.join(basedir, 'Plugins')
|
||||
|
||||
# Set standard cache location
|
||||
cachedir = os.path.join(basedir, 'Cache')
|
||||
os.makedirs(cachedir, exist_ok=True)
|
||||
picard.const.CACHE_DIR = cachedir
|
||||
|
||||
Reference in New Issue
Block a user