Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,36 +54,36 @@ jobs:
shell: powershell
run: .\Scripts\post_build.ps1
- name: Upload Plugin Nupkg
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v5
with:
name: Plugin nupkg
path: |
Output\Release\Flow.Launcher.Plugin.*.nupkg
compression-level: 0
- name: Upload Setup
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v5
with:
name: Flow Installer
path: |
Output\Packages\Flow-Launcher-*.exe
compression-level: 0
- name: Upload Portable Version
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v5
with:
name: Portable Version
path: |
Output\Packages\Flow-Launcher-Portable.zip
compression-level: 0
- name: Upload Full Nupkg
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v5
with:
name: Full nupkg
path: |
Output\Packages\FlowLauncher-*-full.nupkg

compression-level: 0
- name: Upload Release Information
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v5
with:
name: RELEASES
path: |
Expand Down
4 changes: 2 additions & 2 deletions Flow.Launcher.Core/Configuration/Portable.cs
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,8 @@ private static void IndicateDeletion(string filePathTodelete)
public void PreStartCleanUpAfterPortabilityUpdate()
{
// Specify here so this method does not rely on other environment variables to initialise
var portableDataDir = Path.Combine(Directory.GetParent(Assembly.GetExecutingAssembly().Location.NonNull()).ToString(), "UserData");
var roamingDataDir = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "FlowLauncher");
var portableDataDir = DataLocation.PortableDataPath;
var roamingDataDir = DataLocation.RoamingDataPath;

// Get full path to the .dead files for each case
var portableDataDeleteFilePath = Path.Combine(portableDataDir, DataLocation.DeletionIndicatorFile);
Expand Down
9 changes: 8 additions & 1 deletion Flow.Launcher.Core/ExternalPlugins/PluginsManifest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,11 @@ public static class PluginsManifest

public static async Task<bool> UpdateManifestAsync(bool usePrimaryUrlOnly = false, CancellationToken token = default)
{
bool lockAcquired = false;
try
{
await manifestUpdateLock.WaitAsync(token).ConfigureAwait(false);
lockAcquired = true;

if (UserPlugins == null || usePrimaryUrlOnly || DateTime.Now.Subtract(lastFetchedAt) >= fetchTimeout)
{
Expand All @@ -59,13 +61,18 @@ public static async Task<bool> UpdateManifestAsync(bool usePrimaryUrlOnly = fals
return true;
}
}
catch (OperationCanceledException)
{
// Ignored
}
catch (Exception e)
{
API.LogException(ClassName, "Http request failed", e);
}
finally
{
manifestUpdateLock.Release();
// Only release the lock if it was acquired
if (lockAcquired) manifestUpdateLock.Release();
}

return false;
Expand Down
5 changes: 3 additions & 2 deletions Flow.Launcher.Core/Flow.Launcher.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,11 @@
<ItemGroup>
<PackageReference Include="Droplex" Version="1.7.0" />
<PackageReference Include="FSharp.Core" Version="9.0.303" />
<PackageReference Include="Meziantou.Framework.Win32.Jobs" Version="3.4.4" />
<PackageReference Include="Meziantou.Framework.Win32.Jobs" Version="3.4.5" />
<PackageReference Include="Microsoft.IO.RecyclableMemoryStream" Version="3.0.1" />
<PackageReference Include="SemanticVersioning" Version="3.0.0" />
<PackageReference Include="squirrel.windows" Version="1.5.2" NoWarn="NU1701" />
<!-- Do not upgrade this to higher version since higher version removes UpdateManager instance -->
<PackageReference Include="squirrel.windows" Version="1.9.0" NoWarn="NU1701" />
<PackageReference Include="StreamJsonRpc" Version="2.22.11" />
</ItemGroup>

Expand Down
5 changes: 3 additions & 2 deletions Flow.Launcher.Core/Plugin/PluginConfig.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
using System;
using System;
using System.Collections.Generic;
using System.Linq;
using System.IO;
using Flow.Launcher.Infrastructure;
using Flow.Launcher.Plugin;
using System.Text.Json;
using Flow.Launcher.Infrastructure.UserSettings;
using CommunityToolkit.Mvvm.DependencyInjection;

namespace Flow.Launcher.Core.Plugin
Expand All @@ -30,7 +31,7 @@ public static List<PluginMetadata> Parse(string[] pluginDirectories)
// 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
{
Expand Down
2 changes: 1 addition & 1 deletion Flow.Launcher.Core/Plugin/PluginManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -815,7 +815,7 @@ internal static async Task<bool> UninstallPluginAsync(PluginMetadata plugin, boo
}

// 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)
{
Expand Down
Loading
Loading