Small optimization in icon provider

This commit is contained in:
Tiberiu Chibici 2014-09-12 19:22:21 +03:00
parent 22baf7f6a5
commit 93b2e4918f

View File

@ -35,11 +35,13 @@ namespace RainmeterStudio.UI.Controller
// Is a file? // Is a file?
if (item.TargetKind == Reference.ReferenceTargetKind.File || item.TargetKind == Reference.ReferenceTargetKind.Project) if (item.TargetKind == Reference.ReferenceTargetKind.File || item.TargetKind == Reference.ReferenceTargetKind.Project)
{ {
if (String.IsNullOrEmpty(Path.GetExtension(item.StoragePath))) var extension = Path.GetExtension(item.StoragePath);
if (String.IsNullOrEmpty(extension))
key += "Unknown"; key += "Unknown";
else else
key += "_" + Path.GetExtension(item.StoragePath).Substring(1); key += "_" + extension.Substring(1);
} }
// Not a file, try to figure out if a directory // Not a file, try to figure out if a directory