Skip to content

Commit 229987e

Browse files
authored
Release 2.0.3 (#4121)
1 parent f37d4c4 commit 229987e

File tree

63 files changed

+2210
-206
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+2210
-206
lines changed

.github/workflows/dotnet.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,36 +54,36 @@ jobs:
5454
shell: powershell
5555
run: .\Scripts\post_build.ps1
5656
- name: Upload Plugin Nupkg
57-
uses: actions/upload-artifact@v4
57+
uses: actions/upload-artifact@v5
5858
with:
5959
name: Plugin nupkg
6060
path: |
6161
Output\Release\Flow.Launcher.Plugin.*.nupkg
6262
compression-level: 0
6363
- name: Upload Setup
64-
uses: actions/upload-artifact@v4
64+
uses: actions/upload-artifact@v5
6565
with:
6666
name: Flow Installer
6767
path: |
6868
Output\Packages\Flow-Launcher-*.exe
6969
compression-level: 0
7070
- name: Upload Portable Version
71-
uses: actions/upload-artifact@v4
71+
uses: actions/upload-artifact@v5
7272
with:
7373
name: Portable Version
7474
path: |
7575
Output\Packages\Flow-Launcher-Portable.zip
7676
compression-level: 0
7777
- name: Upload Full Nupkg
78-
uses: actions/upload-artifact@v4
78+
uses: actions/upload-artifact@v5
7979
with:
8080
name: Full nupkg
8181
path: |
8282
Output\Packages\FlowLauncher-*-full.nupkg
8383
8484
compression-level: 0
8585
- name: Upload Release Information
86-
uses: actions/upload-artifact@v4
86+
uses: actions/upload-artifact@v5
8787
with:
8888
name: RELEASES
8989
path: |

Flow.Launcher.Core/Configuration/Portable.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,8 @@ private static void IndicateDeletion(string filePathTodelete)
139139
public void PreStartCleanUpAfterPortabilityUpdate()
140140
{
141141
// Specify here so this method does not rely on other environment variables to initialise
142-
var portableDataDir = Path.Combine(Directory.GetParent(Assembly.GetExecutingAssembly().Location.NonNull()).ToString(), "UserData");
143-
var roamingDataDir = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "FlowLauncher");
142+
var portableDataDir = DataLocation.PortableDataPath;
143+
var roamingDataDir = DataLocation.RoamingDataPath;
144144

145145
// Get full path to the .dead files for each case
146146
var portableDataDeleteFilePath = Path.Combine(portableDataDir, DataLocation.DeletionIndicatorFile);

Flow.Launcher.Core/ExternalPlugins/PluginsManifest.cs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,11 @@ public static class PluginsManifest
3131

3232
public static async Task<bool> UpdateManifestAsync(bool usePrimaryUrlOnly = false, CancellationToken token = default)
3333
{
34+
bool lockAcquired = false;
3435
try
3536
{
3637
await manifestUpdateLock.WaitAsync(token).ConfigureAwait(false);
38+
lockAcquired = true;
3739

3840
if (UserPlugins == null || usePrimaryUrlOnly || DateTime.Now.Subtract(lastFetchedAt) >= fetchTimeout)
3941
{
@@ -59,13 +61,18 @@ public static async Task<bool> UpdateManifestAsync(bool usePrimaryUrlOnly = fals
5961
return true;
6062
}
6163
}
64+
catch (OperationCanceledException)
65+
{
66+
// Ignored
67+
}
6268
catch (Exception e)
6369
{
6470
API.LogException(ClassName, "Http request failed", e);
6571
}
6672
finally
6773
{
68-
manifestUpdateLock.Release();
74+
// Only release the lock if it was acquired
75+
if (lockAcquired) manifestUpdateLock.Release();
6976
}
7077

7178
return false;

Flow.Launcher.Core/Flow.Launcher.Core.csproj

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,11 @@
5656
<ItemGroup>
5757
<PackageReference Include="Droplex" Version="1.7.0" />
5858
<PackageReference Include="FSharp.Core" Version="9.0.303" />
59-
<PackageReference Include="Meziantou.Framework.Win32.Jobs" Version="3.4.4" />
59+
<PackageReference Include="Meziantou.Framework.Win32.Jobs" Version="3.4.5" />
6060
<PackageReference Include="Microsoft.IO.RecyclableMemoryStream" Version="3.0.1" />
6161
<PackageReference Include="SemanticVersioning" Version="3.0.0" />
62-
<PackageReference Include="squirrel.windows" Version="1.5.2" NoWarn="NU1701" />
62+
<!-- Do not upgrade this to higher version since higher version removes UpdateManager instance -->
63+
<PackageReference Include="squirrel.windows" Version="1.9.0" NoWarn="NU1701" />
6364
<PackageReference Include="StreamJsonRpc" Version="2.22.11" />
6465
</ItemGroup>
6566

Flow.Launcher.Core/Plugin/PluginConfig.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1-
using System;
1+
using System;
22
using System.Collections.Generic;
33
using System.Linq;
44
using System.IO;
55
using Flow.Launcher.Infrastructure;
66
using Flow.Launcher.Plugin;
77
using System.Text.Json;
8+
using Flow.Launcher.Infrastructure.UserSettings;
89
using CommunityToolkit.Mvvm.DependencyInjection;
910

1011
namespace Flow.Launcher.Core.Plugin
@@ -30,7 +31,7 @@ public static List<PluginMetadata> Parse(string[] pluginDirectories)
3031
// todo use linq when diable plugin is implmented since parallel.foreach + list is not thread saft
3132
foreach (var directory in directories)
3233
{
33-
if (File.Exists(Path.Combine(directory, "NeedDelete.txt")))
34+
if (File.Exists(Path.Combine(directory, DataLocation.PluginDeleteFile)))
3435
{
3536
try
3637
{

Flow.Launcher.Core/Plugin/PluginManager.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -815,7 +815,7 @@ internal static async Task<bool> UninstallPluginAsync(PluginMetadata plugin, boo
815815
}
816816

817817
// Marked for deletion. Will be deleted on next start up
818-
using var _ = File.CreateText(Path.Combine(plugin.PluginDirectory, "NeedDelete.txt"));
818+
using var _ = File.CreateText(Path.Combine(plugin.PluginDirectory, DataLocation.PluginDeleteFile));
819819

820820
if (checkModified)
821821
{

0 commit comments

Comments
 (0)