janhoy commented on a change in pull request #593: URL: https://github.com/apache/solr/pull/593#discussion_r798953318
########## File path: solr/core/src/java/org/apache/solr/filestore/DistribPackageStore.java ########## @@ -572,7 +582,16 @@ private void ensurePackageStoreDir(Path solrHome) { } public static Path getPackageStoreDirPath(Path solrHome) { - return solrHome.resolve(PackageStoreAPI.PACKAGESTORE_DIRECTORY); + var path = solrHome.resolve(PackageStoreAPI.PACKAGESTORE_DIRECTORY); + if (!Files.exists(path)) { + try { + Files.createDirectories(path); + log.info("Created filestore folder {}", path); + } catch (IOException e) { + throw new SolrException(SERVER_ERROR, "Faild creating 'filestore' folder in SOLR_HOME. Check permissions"); Review comment: Per definition, SOLR_HOME should be writable, but if not, we should fast instead of risking a NPE somewhere else. This code is not executed until you start interacting with package store. -- 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