Fix incorrect behavior with App Paths

This commit is contained in:
Yeechan Lu
2014-03-20 04:15:05 +08:00
parent 8b153121ac
commit 6c17107f39
2 changed files with 6 additions and 2 deletions

View File

@@ -39,7 +39,11 @@ namespace Wox.Plugin.System
{ {
object path = key.GetValue(""); object path = key.GetValue("");
if (path is string && global::System.IO.File.Exists((string)path)) if (path is string && global::System.IO.File.Exists((string)path))
list.Add(CreateEntry((string)path)); {
var entry = CreateEntry((string)path);
entry.ExecuteName = item;
list.Add(entry);
}
key.Close(); key.Close();
} }

View File

@@ -33,7 +33,7 @@ namespace Wox.Plugin.System
switch (global::System.IO.Path.GetExtension(file).ToLower()) switch (global::System.IO.Path.GetExtension(file).ToLower())
{ {
case ".exe": case ".exe":
p.ExecuteName = global::System.IO.Path.GetFileNameWithoutExtension(file); p.ExecuteName = global::System.IO.Path.GetFileName(file);
try try
{ {
FileVersionInfo versionInfo = FileVersionInfo.GetVersionInfo(file); FileVersionInfo versionInfo = FileVersionInfo.GetVersionInfo(file);