mirror of
https://github.com/shadowsocks/ShadowsocksX-NG.git
synced 2026-10-26 03:39:49 +00:00
refactor(plugin): remove redundant inspection snapshot checks
This commit is contained in:
@@ -175,8 +175,7 @@ final class PluginCatalog: ObservableObject, PluginExecutableResolving {
|
||||
guard !Task.isCancelled else { return }
|
||||
let facts = await inspector.inspect(URL(fileURLWithPath: path))
|
||||
guard let self, !Task.isCancelled,
|
||||
self.catalogSnapshot().generation == snapshot.generation,
|
||||
self.catalogSnapshot().entry(for: entry.program)?.path == path,
|
||||
self.lock.withLock({ self.state.generation }) == snapshot.generation,
|
||||
PluginFileIdentity(path: path) == identity
|
||||
else { return }
|
||||
for name in names { self.securityFacts[name] = facts }
|
||||
|
||||
Reference in New Issue
Block a user