[Pkg-privacy-commits] [torbrowser-launcher] 145/476: canceling a download deletes the file, fixes #44
Ximin Luo
infinity0 at moszumanska.debian.org
Sat Aug 22 13:21:31 UTC 2015
This is an automated email from the git hooks/post-receive script.
infinity0 pushed a commit to branch debian
in repository torbrowser-launcher.
commit 16367e5107679690e646204dd430f7a5f4cd7893
Author: Micah Lee <micahflee at riseup.net>
Date: Sun Jun 16 11:27:59 2013 -0700
canceling a download deletes the file, fixes #44
---
torbrowser-launcher | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/torbrowser-launcher b/torbrowser-launcher
index 0771df0..9d7303e 100755
--- a/torbrowser-launcher
+++ b/torbrowser-launcher
@@ -839,6 +839,8 @@ class TBLLauncher:
def response_finished(self, msg):
if msg.check(ResponseDone):
self.file_download.close()
+ delattr(self, 'current_download_path')
+
# next task!
self.run_task()
@@ -883,6 +885,9 @@ class TBLLauncher:
self.build_ui()
def download(self, name, url, path):
+ # keep track of current download
+ self.current_download_path = path
+
# initialize the progress bar
mirror_url = url.format(self.common.settings['mirror'])
self.progressbar.set_fraction(0)
@@ -1049,6 +1054,9 @@ class TBLLauncher:
def destroy(self, widget, data=None):
if hasattr(self, 'file_download'):
self.file_download.close()
+ if hasattr(self, 'current_download_path'):
+ os.remove(self.current_download_path)
+ delattr(self, 'current_download_path')
if reactor.running:
reactor.stop()
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-privacy/packages/torbrowser-launcher.git
More information about the Pkg-privacy-commits
mailing list