From abfe0809fa3224ad9bd619a7a162d0d4a24b7108 Mon Sep 17 00:00:00 2001 From: j Date: Wed, 23 Mar 2016 14:48:43 +0100 Subject: [PATCH] create import folder --- oml/item/scan.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/oml/item/scan.py b/oml/item/scan.py index 042f389..da62ef8 100644 --- a/oml/item/scan.py +++ b/oml/item/scan.py @@ -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({