From c7eed5f33e581ba676e31f4b0b794cbce1c6a827 Mon Sep 17 00:00:00 2001 From: "smfr%smfr.org" Date: Sun, 17 Jul 2005 04:51:20 +0000 Subject: [PATCH] Fix bug 299839: prevent 'reset camino' from deleting downloaded files by preventing -cancel: from doing anything on completed downloads. r=me, sr=pinkerton. --- camino/src/download/ProgressViewController.mm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/camino/src/download/ProgressViewController.mm b/camino/src/download/ProgressViewController.mm index 215963c334b..2c4dc7d9fd7 100644 --- a/camino/src/download/ProgressViewController.mm +++ b/camino/src/download/ProgressViewController.mm @@ -220,8 +220,9 @@ enum { -(IBAction)cancel:(id)sender { - // don't allow download to be cancelled twice or we get a nasty crash - if (!mUserCancelled) { + // don't allow download to be cancelled twice or we get a nasty crash, + // and don't cancel completed downloads, because that deletes the file + if (!mUserCancelled && !mDownloadDone) { mUserCancelled = YES; if (mDownloader) { // we should always have one