def submit(self):
        """Trigger exit of file browser, if there's a selection."""
        ### if we are only interested in selecting files, then the
        ### selection shown in the directory panel and the selection entry
        ### might be out of sync, so we make sure they are the same,
        ### based on the entry's content

        if self.expecting_files_only:
            self.update_selection_from_entry()

        ### if there's a selection, we can trigger the exit of the
        ### local loop by setting the 'running' flag off
        if self.path_selection:
            self.running = False

        ### otherwise, we display a proper message
        ### explaining that we can't exit the loop yet
        ### because no path was typed in the entry or
        ### selected
        else:
            create_and_show_dialog(
                (
                    "You must either type name(s) for new path(s) in"
                    " the entry at the bottom or select existing ones"
                ),
            )
Trigger exit of file browser, if there's a selection.
nodezator/fileman/op.py