create import folder

This commit is contained in:
j 2016-03-23 14:48:43 +01:00
parent 72002fc4a1
commit abfe0809fa
1 changed files with 4 additions and 0 deletions

View File

@ -278,6 +278,10 @@ def run_import(options=None):
def import_folder():
if not (state.activity and state.activity.get('activity') == 'import'):
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)
if os.path.exists(import_path):
run_import({