Index: C:/slim/server/Slim/Music/Info.pm =================================================================== --- C:/slim/server/Slim/Music/Info.pm (revision 15142) +++ C:/slim/server/Slim/Music/Info.pm (working copy) @@ -1193,7 +1190,7 @@ my $defaultType = shift || 'unk'; # Remove the anchor if we're checking the suffix. - my ($type, $anchorlessPath); + my ($type, $anchorlessPath, $filepath); if ($fullpath && $fullpath !~ /\x00/) { @@ -1224,20 +1221,24 @@ } $type = typeFromSuffix($anchorlessPath, $defaultType); + } } + # Process raw path, sanity check for folders + if (isFileURL($fullpath)) { + $filepath = Slim::Utils::Misc::pathFromFileURL($fullpath); + } else { + $filepath = $fullpath; + } + + if ($filepath && -d $filepath) { + $type = 'dir'; + } + # We didn't get a type from above - try a little harder. if ((!defined($type) || $type eq 'unk') && $fullpath && $fullpath !~ /\x00/) { - my $filepath; - - if (isFileURL($fullpath)) { - $filepath = Slim::Utils::Misc::pathFromFileURL($fullpath); - } else { - $filepath = $fullpath; - } - if ($filepath) { $anchorlessPath = Slim::Utils::Misc::stripAnchorFromURL($filepath); @@ -1255,10 +1256,6 @@ $type = typeFromSuffix($anchorlessPath, $defaultType); } - } elsif (-d $filepath) { - - $type = 'dir'; - } else { # file doesn't exist, go ahead and do typeFromSuffix