$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 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)) {