MinimServer Forum

Full Version: Exclude folder pattern
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Is there any way I can tell MinimServer to ignore the ext4 'lost+found' folder as it results in a WARNING every time I do a rescan?

Code:
Warning: error scanning file '/media/music/lost+found': java.nio.file.AccessDeniedException: /media/music/lost+found

I've attempted many permutations in the excludePattern property but it still attempts to descend even though it's excluded.
Changing the excludePattern to 'Adele' does exclude the Adele folder, but if I change the permissions to 700 I get the same error, so I assume that's just the way it works.

I know I can move everything down a folder - or live with the warning - so it's not the end of the world, I just know how meticulous you are so thought there might be a solution.
The permissions check is done by Java and is happening before the excludePattern test is applied by MinimServer.

The warning is produced when Java reports any error accessing a file or directory during the scan. It might be possible to add special logic to suppress the warning in certain cases such as the specific combination you have identified but I think it it is safer to report all warnings reported by Java rather than possibly suppress a warning that is useful for the user.
You could reference the excludePattern as you're processing the errors and hide the warning if it was a match. That way it would be an explicit user decision.
The excludePattern setting allows the user to prevent files and folders being included in the Minimserver library. It doesn't prevent these files and folders being read by the Java file tree walker.

When the Java file tree walker encounters an error reading a file or folder, it reports this error to MinimServer. There are number of possible errors that can be reported in this way. This happens before any excludePattern processing is done on the file or folder.

In this error case, it would be possible for MinimServer to try to filter these warning notifications based on some combination of excludePattern checking and looking at the type of error reported. The latter would be difficult because of the large number of different errors that can be reported by the Java file tree walker. My view is that attempting to do this filtering is undesirable because it could cause a significant problem to not be reported to the user when it should have been.
Reference URL's