Signal file provider changes on VPN status update

This commit is contained in:
世界
2026-01-06 01:06:56 +08:00
parent 9d5e4a4e30
commit d201789720
2 changed files with 26 additions and 0 deletions
@@ -213,6 +213,7 @@ public struct CoreView: View {
guard let manager = NSFileProviderManager(for: domain) else {
throw NSError(domain: "CoreView", code: 0, userInfo: [NSLocalizedDescriptionKey: "Failed to get file provider manager"])
}
try await manager.signalEnumerator(for: .workingSet)
let url = try await manager.getUserVisibleURL(for: .rootContainer)
guard let sharedURL = URL(string: "shareddocuments://\(url.path)") else {
throw NSError(domain: "CoreView", code: 0, userInfo: [NSLocalizedDescriptionKey: "Failed to create shared documents URL"])