Skip to content

Commit 0daf52f

Browse files
committed
remove PythonEmbeddable folder regardless if it's being used or not
1 parent cef53bc commit 0daf52f

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

Flow.Launcher.Core/ExternalPlugins/Environments/AbstractPluginEnvironment.cs

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,15 @@ internal IEnumerable<PluginPair> Setup()
4242
return new List<PluginPair>();
4343

4444
// TODO: Remove. This is backwards compatibility for 1.10.0 release- changed PythonEmbeded to Environments/Python
45-
if (!string.IsNullOrEmpty(PluginSettings.PythonDirectory) && PluginSettings.PythonDirectory.StartsWith(Path.Combine(DataLocation.DataDirectory(), "PythonEmbeddable")))
45+
if (Language.Equals(AllowedLanguage.Python, StringComparison.OrdinalIgnoreCase))
4646
{
47-
FilesFolders.RemoveFolderIfExists(PluginSettings.PythonDirectory);
48-
InstallEnvironment();
49-
PluginSettings.PythonDirectory = string.Empty;
47+
FilesFolders.RemoveFolderIfExists(Path.Combine(DataLocation.DataDirectory(), "PythonEmbeddable"));
48+
49+
if (!string.IsNullOrEmpty(PluginSettings.PythonDirectory) && PluginSettings.PythonDirectory.StartsWith(Path.Combine(DataLocation.DataDirectory(), "PythonEmbeddable")))
50+
{
51+
InstallEnvironment();
52+
PluginSettings.PythonDirectory = string.Empty;
53+
}
5054
}
5155

5256
if (!string.IsNullOrEmpty(PluginsSettingsFilePath) && FilesFolders.FileExists(PluginsSettingsFilePath))

0 commit comments

Comments
 (0)