blob: 5c56cb013a758a19a1264d3c4f5cee645ea66e95 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
$NetBSD: patch-bj,v 1.4 2004/12/04 03:50:40 taya Exp $
--- uriloader/exthandler/nsExternalHelperAppService.cpp.orig 2004-11-11 15:56:52.000000000 +0100
+++ uriloader/exthandler/nsExternalHelperAppService.cpp
@@ -1747,6 +1747,11 @@ nsresult nsExternalAppHandler::ExecuteDe
// XXX Put progress dialog in barber-pole mode
// and change text to say "Copying from:".
rv = MoveFile(mFinalFileDestination);
+ if (NS_SUCCEEDED(rv) && action == nsIMIMEInfo::saveToDisk)
+ {
+ nsCOMPtr<nsILocalFile> destfile(do_QueryInterface(mFinalFileDestination));
+ sSrv->FixFilePermissions(destfile);
+ }
}
// Notify dialog that download is complete.
@@ -1913,7 +1918,6 @@ nsresult nsExternalAppHandler::MoveFile(
if (directoryLocation)
{
rv = mTempFile->MoveToNative(directoryLocation, fileName);
- sSrv->FixFilePermissions(fileToUse);
}
if (NS_FAILED(rv))
{
|