def add_files(self): files = qtutils.open_files(N_('Select patch file(s)...'), directory=self.curdir, filter='Patches (*.patch *.mbox)') if not files: return self.curdir = os.path.dirname(files[0]) self.add_paths([os.path.relpath(f) for f in files])