empty zip cannot be opened (NS_ERROR_INVALID_POINTER) [nsIZipReader.open]

RESOLVED WORKSFORME

Status

()

Core
Networking
RESOLVED WORKSFORME
12 years ago
10 years ago

People

(Reporter: Nickolay_Ponomarev, Assigned: michal)

Tracking

({testcase})

Trunk
testcase
Points:
---
Bug Flags:
in-testsuite ?

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

12 years ago
const Cc = Components.classes;
const Ci = Components.interfaces;

var file = Components.classes["@mozilla.org/file/local;1"] .createInstance(Components.interfaces.nsILocalFile); file.initWithPath("c:\\empty.zip");

var zipreader = Cc["@mozilla.org/libjar/zip-reader;1"]. createInstance(Ci.nsIZipReader);
zipreader.open(file); // <---
zipreader.close();
var entries = zipreader.findEntries('*');

Throws an exception:
NS_ERROR_INVALID_POINTER on line 7: Component returned failure code: 0x80004003 (NS_ERROR_INVALID_POINTER) [nsIZipReader.open]

On an empty ZIP file (to be attached).
(Reporter)

Comment 1

12 years ago
Created attachment 238066 [details]
empty.zip
(Assignee)

Updated

10 years ago
Assignee: nobody → michal
(Assignee)

Comment 2

10 years ago
It seems that this bug was already fixed by some other patch. I can reproduce it with 2.0.0.13 but not with latest TRUNK.
(Reporter)

Comment 3

10 years ago
Same here. Looks like it was fixed.
Status: NEW → RESOLVED
Last Resolved: 10 years ago
Flags: in-testsuite?
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.