You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by GitBox <gi...@apache.org> on 2021/11/22 15:22:48 UTC

[GitHub] [sling-org-apache-sling-installer-provider-file] kwin commented on a change in pull request #4: SLING-7504 optionally create directories to monitor

kwin commented on a change in pull request #4:
URL: https://github.com/apache/sling-org-apache-sling-installer-provider-file/pull/4#discussion_r754381364



##########
File path: src/main/java/org/apache/sling/installer/provider/file/impl/FileInstaller.java
##########
@@ -84,6 +88,13 @@ public void start(final OsgiInstaller installer, final SlingSettingsService sett
                 key = "${sling.home}" + key.substring(settings.getSlingHomePath().length());
             }
             logger.debug("Starting monitor for {}", config.directory);
+            if (autoCreateDirectories) {
+                try {
+                    Files.createDirectory(Paths.get(config.directory));

Review comment:
       Yes indeed, logs 
   ```
   22.11.2021 16:20:53.877 *WARN* [FelixStartLevel] org.apache.sling.installer.provider.file.impl.FileInstaller Could not create directory to monitor at /Users/konradwindszus/git/sling/sling-org-apache-sling-starter/target/launchers/sling-12-oak-tar/install
   java.nio.file.FileAlreadyExistsException: /Users/konradwindszus/git/sling/sling-org-apache-sling-starter/target/launchers/sling-12-oak-tar/install
   ...
   ```
   
   in case the directory does already exist
   




-- 
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: dev-unsubscribe@sling.apache.org

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