-
Stephan Bergmann yazdı
...instead of returning a null XHierarchicalNameAccess. Otherwise, UCB's globalTransfer from a vnd.sun.star.package URL that denotes a file that is not a zip file to a file URL folder (i.e., to extract the zip content) silently succeeds but just creates an empty file in the target folder. That, in turn, causes "unopkg add foo.oxt", where foo.oxt is a file that is not a zip file, to silently succeed and add an "empty" extension. This change is somewhat bold in that it changes createPackage from "can return empty reference" to "never returns empty reference, but can throw RuntimeException." Especially, it considers "empty name" as a (silent) violation of its contract with its caller now. I hope this does not affect any legitimate scenarios---at least, it does not break a "make check" here. (In turn, the two package_ucp::Content::getPackage overloads change to never return a null reference, either. And I changed the parameters of createPackage, seeing that all call-sites pass in some PackageUri's getPackage()/getParam() pair.) Change-Id: I0eab5f8059dfedefc7030da38da528ba21ea8d79
6b562710