create import folder
This commit is contained in:
parent
72002fc4a1
commit
abfe0809fa
1 changed files with 4 additions and 0 deletions
|
@ -278,6 +278,10 @@ def run_import(options=None):
|
||||||
def import_folder():
|
def import_folder():
|
||||||
if not (state.activity and state.activity.get('activity') == 'import'):
|
if not (state.activity and state.activity.get('activity') == 'import'):
|
||||||
import_path = settings.preferences['importPath']
|
import_path = settings.preferences['importPath']
|
||||||
|
import_path = os.path.normpath(os.path.expanduser(import_path))
|
||||||
|
import_path_base = os.path.dirname(import_path)
|
||||||
|
if not os.path.exists(import_path) and os.path.exists(import_path_base):
|
||||||
|
os.makedirs(import_path)
|
||||||
logger.debug('scan importPath %s', import_path)
|
logger.debug('scan importPath %s', import_path)
|
||||||
if os.path.exists(import_path):
|
if os.path.exists(import_path):
|
||||||
run_import({
|
run_import({
|
||||||
|
|
Loading…
Reference in a new issue