Commit d15a769f authored by Martin Schorb's avatar Martin Schorb
Browse files

allow creation of new directories

parent 40a18c5c
Pipeline #34938 passed with stage
in 57 seconds
...@@ -297,7 +297,7 @@ states.append(State({'component': 'store_stackparams', 'module': parent}, 'data' ...@@ -297,7 +297,7 @@ states.append(State({'component': 'store_stackparams', 'module': parent}, 'data'
states.append(State({'component': 'sliceim_section_in_0', 'module': parent}, 'value')) states.append(State({'component': 'sliceim_section_in_0', 'module': parent}, 'value'))
states.append(State({'component': 'sliceim_contrastslider_0', 'module': parent}, 'value')) states.append(State({'component': 'sliceim_contrastslider_0', 'module': parent}, 'value'))
states.append(State({'component': 'scale_input', 'module': label}, 'value')) states.append(State({'component': 'scale_input', 'module': label}, 'value'))
states.append(State({'component': 'newdir_sel', 'module': parent}, 'value'))
@app.callback([Output({'component': 'go', 'module': label}, 'disabled'), @app.callback([Output({'component': 'go', 'module': label}, 'disabled'),
Output({'component': 'buttondiv', 'module': label}, 'children'), Output({'component': 'buttondiv', 'module': label}, 'children'),
...@@ -316,7 +316,8 @@ def sliceexport_execute_gobutton(click, outdir, stack, ...@@ -316,7 +316,8 @@ def sliceexport_execute_gobutton(click, outdir, stack,
numjobs, timelim, numjobs, timelim,
comp_sel, owner, project, comp_sel, owner, project,
Xmin, Xmax, Ymin, Ymax, Zmin, Zmax, Xmin, Xmax, Ymin, Ymax, Zmin, Zmax,
sp_store, slice_in, c_limits, scale): sp_store, slice_in, c_limits, scale,
newdir):
if not dash.callback_context.triggered: if not dash.callback_context.triggered:
raise PreventUpdate raise PreventUpdate
...@@ -464,7 +465,7 @@ def sliceexport_execute_gobutton(click, outdir, stack, ...@@ -464,7 +465,7 @@ def sliceexport_execute_gobutton(click, outdir, stack,
elif is_bad_filename(outdir): elif is_bad_filename(outdir):
return True, 'Wrong characters in input directory path. Please fix!', dash.no_update, outstore return True, 'Wrong characters in input directory path. Please fix!', dash.no_update, outstore
if not os.access(outdir, os.W_OK | os.X_OK): if newdir == [] and not os.access(outdir, os.W_OK | os.X_OK):
return True, 'Output directory not writable!', dash.no_update, outstore return True, 'Output directory not writable!', dash.no_update, outstore
else: else:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment