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
21a6fdd100
commit
fbb9e09237
3 changed files with 4 additions and 2 deletions
|
|
@ -6,6 +6,7 @@ using Flow.Launcher.Infrastructure;
|
|||
using Flow.Launcher.Plugin;
|
||||
using System.Text.Json;
|
||||
using CommunityToolkit.Mvvm.DependencyInjection;
|
||||
using Flow.Launcher.Infrastructure.UserSettings;
|
||||
|
||||
namespace Flow.Launcher.Core.Plugin
|
||||
{
|
||||
|
|
@ -30,7 +31,7 @@ namespace Flow.Launcher.Core.Plugin
|
|||
// todo use linq when diable plugin is implmented since parallel.foreach + list is not thread saft
|
||||
foreach (var directory in directories)
|
||||
{
|
||||
if (File.Exists(Path.Combine(directory, "NeedDelete.txt")))
|
||||
if (File.Exists(Path.Combine(directory, DataLocation.PluginDeleteFile)))
|
||||
{
|
||||
try
|
||||
{
|
||||
|
|
|
|||
|
|
@ -815,7 +815,7 @@ namespace Flow.Launcher.Core.Plugin
|
|||
}
|
||||
|
||||
// Marked for deletion. Will be deleted on next start up
|
||||
using var _ = File.CreateText(Path.Combine(plugin.PluginDirectory, "NeedDelete.txt"));
|
||||
using var _ = File.CreateText(Path.Combine(plugin.PluginDirectory, DataLocation.PluginDeleteFile));
|
||||
|
||||
if (checkModified)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -42,6 +42,7 @@ namespace Flow.Launcher.Infrastructure.UserSettings
|
|||
public const string PythonEnvironmentName = "Python";
|
||||
public const string NodeEnvironmentName = "Node.js";
|
||||
public const string PluginEnvironments = "Environments";
|
||||
public const string PluginDeleteFile = "NeedDelete.txt";
|
||||
public static string PluginEnvironmentsPath => Path.Combine(DataDirectory(), PluginEnvironments);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue