Bug 39056 - getStorageClsid() on the root node always returns zero.
Summary: getStorageClsid() on the root node always returns zero.
Alias: None
Product: POI
Classification: Unclassified
Component: POIFS (show other bugs)
Version: 3.0-dev
Hardware: Other other
: P2 normal (vote)
Target Milestone: ---
Assignee: POI Developers List
Keywords: PatchAvailable
Depends on:
Reported: 2006-03-21 23:04 UTC by Trejkaz (pen name)
Modified: 2009-04-20 10:09 UTC (History)
0 users

Workaround for the bug (690 bytes, patch)
2006-03-21 23:05 UTC, Trejkaz (pen name)
Details | Diff
Patch against current trunk (600 bytes, patch)
2009-04-07 19:29 UTC, Trejkaz (pen name)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Trejkaz (pen name) 2006-03-21 23:04:42 UTC
After creating a POIFSFileSystem, fs.getRoot().getStorageClsid() always returns
a GUID consisting entirely of zeros.
Comment 1 Trejkaz (pen name) 2006-03-21 23:05:29 UTC
Created attachment 17932 [details]
Workaround for the bug

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.
Comment 2 David Fisher 2008-12-29 14:56:28 UTC
The code has been changed and will no longer support this workaround.

Please check with the latest 3.5beta4 and re-open if you still have trouble with the root CLSID.
Comment 3 Trejkaz (pen name) 2009-04-07 19:29:52 UTC
Created attachment 23457 [details]
Patch against current trunk

Still a problem, here's an updated patch.
Comment 4 Yegor Kozlov 2009-04-20 10:09:46 UTC
Applied in r766757