fix import state before import started
This commit is contained in:
parent
26f2a40601
commit
ceffe456db
3 changed files with 16 additions and 11 deletions
|
@ -328,8 +328,11 @@ def _import(data):
|
||||||
mode copy|move
|
mode copy|move
|
||||||
}
|
}
|
||||||
'''
|
'''
|
||||||
if 'cancel' in state.activity:
|
if os.path.exists(data['path']):
|
||||||
del state.activity['cancel']
|
state.activity = {
|
||||||
|
'activity': 'import',
|
||||||
|
'path': data['path'],
|
||||||
|
}
|
||||||
state.tasks.queue('import', data)
|
state.tasks.queue('import', data)
|
||||||
return {}
|
return {}
|
||||||
actions.register(_import, 'import', cache=False)
|
actions.register(_import, 'import', cache=False)
|
||||||
|
|
|
@ -233,6 +233,7 @@ def run_import(options=None):
|
||||||
remove_empty_folders(prefix, True)
|
remove_empty_folders(prefix, True)
|
||||||
|
|
||||||
def import_folder():
|
def import_folder():
|
||||||
|
if not (state.activity and state.activity.get('activity') == 'import'):
|
||||||
import_path = settings.preferences['importPath']
|
import_path = settings.preferences['importPath']
|
||||||
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):
|
||||||
|
|
|
@ -111,6 +111,7 @@ oml.ui.importExportDialog = function() {
|
||||||
: renderForm('export', isActive)
|
: renderForm('export', isActive)
|
||||||
);
|
);
|
||||||
that.options({content: $outerPanel});
|
that.options({content: $outerPanel});
|
||||||
|
setButton(result.data);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue