Description
NameDetector.detect() strip any fragments after #, but not only after extension, when filename contains dots and hashes.
Example: 'ABC#192.168.0.1#2.xxx' will be stripped to 'ABC#192.168.0.1'.
There are filenames that contains dots not only in extension.
Should change line:
int dot = name.indexOf('.')
to:
int dot = name.lastIndexOf('.');