- p = subprocess.Popen(['tar', '-xf', self.paths['file']['tarball'], '-C', self.paths['dir']['tbb']], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
- self.pulse_until_process_exits(p)
+ # make sure this file is a tarfile
+ if tarfile.is_tarfile(self.paths['file']['tarball']):
+ tf = tarfile.open(self.paths['file']['tarball'])
+ tf.extractall(self.paths['dir']['tbb'])
+ else:
+ self.set_gui('task', _("Tor Browser Launcher doesn't understand the file format of {0}"), ['start_over'], False)
+ self.clear_ui()
+ self.build_ui()