Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
JCR Installer 3.1.24
-
None
Description
Currently, the JCR Installer Provider maintains a boolean flag needsScan which is set to true on start and when an event occurs in the JCR for a given watched folder.
Subsequently, when a scan is requested because of that flag being true, it will set the flag to false at the beginning of the scan. In other words, the folder will not be rescanned until either the provider is restarted or something changes in the repository (indicated by an event), respectively.
This is fine, however, it ignores the fact that an exception can occur during the scan (e.g., connection is gone, etc.). If that happens, it will not finish the scan but the needsScan will already be false - hence, until something changes, the folder will not be rescanned.
The fix seems simple. The needsScan=false should be moved form the start of the scan method to the end of it.