mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Improve code quality
This commit is contained in:
parent
2856da83c1
commit
bad7db69dc
2 changed files with 5 additions and 4 deletions
|
|
@ -97,7 +97,7 @@ namespace Flow.Launcher.Plugin.Explorer
|
|||
return Context.API.GetTranslation("plugin_explorer_plugin_description");
|
||||
}
|
||||
|
||||
private void FillQuickAccessLinkNames()
|
||||
private static void FillQuickAccessLinkNames()
|
||||
{
|
||||
// Legacy version does not have names for quick access links, so we fill them with the path name.
|
||||
foreach (var link in Settings.QuickAccessLinks)
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
using System;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.ComponentModel;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Windows;
|
||||
using System.Windows.Forms;
|
||||
|
|
@ -190,13 +191,13 @@ public partial class QuickAccessLinkSettings
|
|||
private static ResultType GetResultType(string path)
|
||||
{
|
||||
// Check if the path is a file or folder
|
||||
if (System.IO.File.Exists(path))
|
||||
if (File.Exists(path))
|
||||
{
|
||||
return ResultType.File;
|
||||
}
|
||||
else if (System.IO.Directory.Exists(path))
|
||||
else if (Directory.Exists(path))
|
||||
{
|
||||
if (string.Equals(System.IO.Path.GetPathRoot(path), path, StringComparison.OrdinalIgnoreCase))
|
||||
if (string.Equals(Path.GetPathRoot(path), path, StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
return ResultType.Volume;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue