Make our hail-mary logic a little more flexible.

(Jason's original implementation just truncated the $sn, no matter
what. I modified it slightly.)

Signed-off-by: Jesse Vincent <jesse@keyboard.io>
pull/841/head
Jason Koh 5 years ago committed by Jesse Vincent
parent 94790f8db9
commit b675ff2902

@ -77,6 +77,8 @@ sub try_for_location_id {
sub try_for_sn_prefix { sub try_for_sn_prefix {
my $sn = shift; my $sn = shift;
# If macOS has appended 'E', take it off to maximise our chances of a match.
$sn =~ s/E$//;
# If none of the above tests succeeds, just list the directory and see if there are any # If none of the above tests succeeds, just list the directory and see if there are any
# files that have the device shortname that we expect: # files that have the device shortname that we expect:

Loading…
Cancel
Save