From 07c6d7fc24af62a56fff0ee7c5514858ea92dc9e Mon Sep 17 00:00:00 2001 From: GrĂ©goire DuchĂȘne Date: Sat, 8 Nov 2025 10:57:02 +0000 Subject: Check suffix in the whole file name --- Sources/Watcher.swift | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'Sources') diff --git a/Sources/Watcher.swift b/Sources/Watcher.swift index c7ca85a..3b08efd 100644 --- a/Sources/Watcher.swift +++ b/Sources/Watcher.swift @@ -1,6 +1,5 @@ import Logging import ServiceLifecycle -import SystemPackage import _NIOFileSystem struct Watcher: Service { @@ -16,7 +15,7 @@ struct Watcher: Service { do { isDownloading = try await FileSystem.shared.withDirectoryHandle(atPath: self.directory) { try await $0.listContents().contains { - $0.name.extension?.hasSuffix(self.suffix) ?? false + $0.name.string.hasSuffix(self.suffix) } } } catch is CancellationError { -- cgit v1.2.3-70-g09d2