mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-28 16:41:52 +00:00
fixes bug 308370 "nsIncrementalDownload::GetDestination should return a clone of nsIFile" r=biesi
This commit is contained in:
parent
0c3f34f4d3
commit
cb8b2568ac
@ -429,8 +429,14 @@ nsIncrementalDownload::GetFinalURI(nsIURI **result)
|
||||
NS_IMETHODIMP
|
||||
nsIncrementalDownload::GetDestination(nsIFile **result)
|
||||
{
|
||||
NS_IF_ADDREF(*result = mDest);
|
||||
return NS_OK;
|
||||
if (!mDest) {
|
||||
*result = nsnull;
|
||||
return NS_OK;
|
||||
}
|
||||
// Return a clone of mDest so that callers may modify the resulting nsIFile
|
||||
// without corrupting our internal object. This also works around the fact
|
||||
// that some nsIFile impls may cache the result of stat'ing the filesystem.
|
||||
return mDest->Clone(result);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
|
Loading…
x
Reference in New Issue
Block a user