aboutsummaryrefslogtreecommitdiff
path: root/Sources
diff options
context:
space:
mode:
authorGrégoire Duchêne <gduchene@awhk.org>2025-11-08 10:57:02 +0000
committerGrégoire Duchêne <gduchene@awhk.org>2025-11-08 11:00:55 +0000
commit07c6d7fc24af62a56fff0ee7c5514858ea92dc9e (patch)
tree497a229491ad4423000b085c7cf5bf8264cafcf1 /Sources
parent538cd626aa4207a28bdea3a08ec9a700a265d5fb (diff)
Check suffix in the whole file nameHEADmain
Diffstat (limited to 'Sources')
-rw-r--r--Sources/Watcher.swift3
1 files changed, 1 insertions, 2 deletions
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 {