Skip to content

armgit / Filee

Public Imported from GitHub
0

Free, open-source file converter. Convert 263 formats offline by drag & drop — images, PDF, Word, Excel, PowerPoint, HWP/HWPX, video, audio, e-books and archives. No upload, no Office needed.

CI: no platform warnings, watcher tests step through their own settle time, one Linux/macOS run per PR

KnifeLemonf8c35c9fc2f0
diff --git a/.github/workflows/portable.yml b/.github/workflows/portable.yml
index 63cbda0c..e57f8ba8 100644
--- a/.github/workflows/portable.yml
+++ b/.github/workflows/portable.yml
@@ -13,8 +13,6 @@ on:
description: 'Package version (empty uses Directory.Build.props)'
type: string
required: false
- # Every pull request builds, tests and launches the app on Linux and on real Macs (screenshots in the results).
- pull_request:
permissions:
contents: read
diff --git a/src/Filee.App/App.axaml.cs b/src/Filee.App/App.axaml.cs
index 1d06c2c3..afa0d355 100644
--- a/src/Filee.App/App.axaml.cs
+++ b/src/Filee.App/App.axaml.cs
@@ -89,7 +89,7 @@ public partial class App : Application
&& store.Settings.Triggers.Any(t => t.Enabled && t.Kind == TriggerKind.Drag))
DispatcherTimer.RunOnce(() =>
{
- if (triggers.NeedsPermission)
+ if (OperatingSystem.IsMacOS() && triggers.NeedsPermission)
mac.RequestAccessibilityPermission();
}, TimeSpan.FromSeconds(1.5));
diff --git a/src/Filee.Platform.MacOS/MacOSServicesProvider.cs b/src/Filee.Platform.MacOS/MacOSServicesProvider.cs
index 36fa706a..aacba77e 100644
--- a/src/Filee.Platform.MacOS/MacOSServicesProvider.cs
+++ b/src/Filee.Platform.MacOS/MacOSServicesProvider.cs
@@ -8,7 +8,6 @@ using System.Runtime.Versioning;
namespace Filee.Platform.MacOS;
-[SupportedOSPlatform("macos")]
public static class MacOSServicesProvider
{
/// <summary>The service's menu title in Info.plist; ServicesMenu.strings in each .lproj translates it.</summary>
@@ -31,6 +30,7 @@ public static class MacOSServicesProvider
/// Answers the service from now on; <paramref name="handler"/> gets the files (on the main thread). Call it on the
/// main thread early at start: a service picked while Filee wasn't running is delivered once this is set.
/// </summary>
+ [SupportedOSPlatform("macos")]
public static void Register(Action<IReadOnlyList<string>> handler)
{
_handler = handler;
diff --git a/tests/Filee.Core.Tests/FolderWatcherTests.cs b/tests/Filee.Core.Tests/FolderWatcherTests.cs
index 3854b28b..d7752746 100644
--- a/tests/Filee.Core.Tests/FolderWatcherTests.cs
+++ b/tests/Filee.Core.Tests/FolderWatcherTests.cs
@@ -35,10 +35,14 @@ public class FolderWatcherTests
await queue.RunAsync(job);
jobs.Add(job);
return job;
- }, time: time);
+ }, settleTime: TimeSpan.FromSeconds(2), time: time);
return (watcher, time, jobs, queue);
}
+ [Fact]
+ public void Default_wait_is_longer_where_files_being_written_are_not_locked() =>
+ Assert.Equal(TimeSpan.FromSeconds(OperatingSystem.IsWindows() ? 2 : 5), FolderWatcher.DefaultSettleTime);
+
[Fact]
public async Task A_file_is_converted_once_it_has_settled()
{