From 48a9c0cd15fe3eb89466760fa6a8c5b4b77c4471 Mon Sep 17 00:00:00 2001 From: "mozilla.mano%sent.com" Date: Sat, 15 Apr 2006 14:02:12 +0000 Subject: [PATCH] Bug 269813 - return failure when trying to open a zipreader twice. patch by Nickolay Ponomarev , r=darin, sr=bz. --- modules/libjar/nsJAR.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/libjar/nsJAR.cpp b/modules/libjar/nsJAR.cpp index 353a82c5b6ac..722f5a39fade 100644 --- a/modules/libjar/nsJAR.cpp +++ b/modules/libjar/nsJAR.cpp @@ -213,6 +213,8 @@ nsJAR::GetFile(nsIFile* *result) NS_IMETHODIMP nsJAR::Open() { + NS_ENSURE_TRUE(!mFd, NS_ERROR_ALREADY_INITIALIZED); + nsresult rv; nsCOMPtr localFile = do_QueryInterface(mZipFile, &rv); if (NS_FAILED(rv)) return rv;