def on_done(self, old, new):
        """Handle the tab duplication when the user is done with the input panel."""

        new_path = dirname(new)
        if exists(new_path) and isdir(new_path):
            if not exists(new) or sublime.ok_cancel_dialog("Overwrite %s?" % new, "Replace"):
                try:
                    with open(old, 'rb') as f:
                        text = f.read()

                    with open(new, 'wb') as f:
                        f.write(text)

                    self.window.open_file(new)
                except Exception:
                    sublime.status_message("Unable to duplicate")
dataset/ETHPy150Open facelessuser/TabsExtra/tabs_extra.py/TabsExtraDuplicateCommand.on_done/original