def update_entry_with_selected(self):
        """If a file was selected, copy its name to entry."""
        ps = self.path_selection

        ps.clear()

        ps.extend(self.dir_panel.get_selection())

        if (
            self.expecting_files_only
            and len(ps) == 1
            and ps[0].is_dir()
        ):
            pass

        else:

            name = pathsep.join(
                path.name
                for path in self.path_selection
            )

            self.selection_entry.set(name, False)
If a file was selected, copy its name to entry.
nodezator/fileman/op.py