Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Exclude folder pattern
03-10-2021, 18:08
Post: #1
Exclude folder pattern
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.
Find all posts by this user
Quote this message in a reply
03-10-2021, 22:15
Post: #2
RE: Exclude folder pattern
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.
Find all posts by this user
Quote this message in a reply
03-10-2021, 22:54
Post: #3
RE: Exclude folder pattern
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.
Find all posts by this user
Quote this message in a reply
04-10-2021, 13:28
Post: #4
RE: Exclude folder pattern
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.
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)