noblepaul commented on a change in pull request #560:
URL: https://github.com/apache/solr/pull/560#discussion_r793268524



##########
File path: solr/core/src/java/org/apache/solr/pkg/PackageLoader.java
##########
@@ -274,20 +349,25 @@ public void writeMap(EntryWriter ew) throws IOException {
         version.writeMap(ew);
       }
 
-      Version(Package parent, PackageAPI.PkgVersion v) {
+      Version(Package parent, PackageAPI.PkgVersion v, Path localPkgDir) {
         this.parent = parent;
         this.version = v;
         List<Path> paths = new ArrayList<>();
-
-        List<String> errs = new ArrayList<>();
-        coreContainer.getPackageStoreAPI().validateFiles(version.files, true, 
s -> errs.add(s));
-        if(!errs.isEmpty()) {
-          throw new RuntimeException("Cannot load package: " +errs);
-        }
-        for (String file : version.files) {
-          
paths.add(coreContainer.getPackageStoreAPI().getPackageStore().getRealpath(file));
+        if(localPkgDir != null) {
+          for (String file : v.files) {
+            if(file.charAt(0)== '/') file =file.substring(1);
+            paths.add( localPkgDir.resolve(file).toAbsolutePath()) ;
+          }
+        } else {

Review comment:
       Yeah, I think a subclass with a different name would be better  




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org
For additional commands, e-mail: issues-h...@solr.apache.org

Reply via email to