File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
webknossos/webknossos/dataset Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -632,16 +632,16 @@ def from_images(
632632 if use_bioformats is not False :
633633 valid_suffixes .update (pims_images .get_valid_bioformats_suffixes ())
634634
635- if input_upath .is_dir ():
635+ if input_upath .is_file ():
636+ if input_upath .suffix .lstrip ("." ).lower () in valid_suffixes :
637+ input_files = [UPath (input_upath .name )]
638+ input_upath = input_upath .parent
639+ else :
636640 input_files = [
637641 i .relative_to (input_upath )
638642 for i in input_upath .glob ("**/*" )
639643 if i .is_file () and i .suffix .lstrip ("." ).lower () in valid_suffixes
640644 ]
641- else :
642- if input_upath .suffix .lstrip ("." ).lower () in valid_suffixes :
643- input_files = [UPath (input_upath .name )]
644- input_upath = input_upath .parent
645645
646646 if len (input_files ) == 0 :
647647 raise ValueError (
You can’t perform that action at this time.
0 commit comments