[EMAIL PROTECTED] wrote:
In other words, new POIFSFileSystem(stream).getRoot().getStorageClsid().toString()
should always return a bunch of 0s.

Note that there is a PropertyTable(start, blockList) that appears to
generate better stuff, but that is a local variable in
POIFSFileSystem(InputStream) perhaps the bug is that it should be\
assigned to the class variable instead?

Actually, it turns out the local variable is a property table which is gradually copied into the one held in the instance variable. When I tried assigning directly to the instance variable in that location, I got an error when it tried to add child elements which already existed.

The real problem is probably that the recursive processProperties() method only processes the children and below. That method *does* manually set in the class ID for the directory nodes, it's only the root which doesn't get it set (which is where it is almost always needed.)

I suppose a slightly better solution than my workaround would be having processProperties() start from the root. But the problem is, the PropertyTable() constructor automatically adds the root node all by itself, so it would need a setRoot() method perhaps.

Anyway, I've put this in Bugzilla, Bug 39056, with a nice workaround patch.

Daniel


--
Daniel Noll

Nuix Pty Ltd
Suite 79, 89 Jones St, Ultimo NSW 2007, Australia    Ph: +61 2 9280 0699
Web: http://www.nuix.com.au/                        Fax: +61 2 9212 6902

This message is intended only for the named recipient. If you are not
the intended recipient you are notified that disclosing, copying,
distributing or taking any action in reliance on the contents of this
message or attachment is strictly prohibited.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
Mailing List:     http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta Poi Project:  http://jakarta.apache.org/poi/

Reply via email to