diff --git a/Sources/NextcloudFileProviderKit/Enumeration/Enumerator+SyncEngine.swift b/Sources/NextcloudFileProviderKit/Enumeration/Enumerator+SyncEngine.swift index 07ca685..47ba602 100644 --- a/Sources/NextcloudFileProviderKit/Enumeration/Enumerator+SyncEngine.swift +++ b/Sources/NextcloudFileProviderKit/Enumeration/Enumerator+SyncEngine.swift @@ -18,7 +18,6 @@ import OSLog extension Enumerator { func fullRecursiveScan( - ncAccount: Account, remoteInterface: RemoteInterface, dbManager: FilesDatabaseManager, scanChangesOnly: Bool @@ -35,7 +34,6 @@ extension Enumerator { let results = await self.scanRecursively( rootContainerDirectoryMetadata, - ncAccount: ncAccount, remoteInterface: remoteInterface, dbManager: dbManager, scanChangesOnly: scanChangesOnly @@ -67,7 +65,6 @@ extension Enumerator { private func scanRecursively( _ directoryMetadata: ItemMetadata, - ncAccount: Account, remoteInterface: RemoteInterface, dbManager: FilesDatabaseManager, scanChangesOnly: Bool @@ -92,7 +89,7 @@ extension Enumerator { let itemServerUrl = directoryMetadata.ocId == NSFileProviderItemIdentifier.rootContainer.rawValue - ? ncAccount.davFilesUrl + ? remoteInterface.account.davFilesUrl : directoryMetadata.serverUrl + "/" + directoryMetadata.fileName Self.logger.debug("About to read: \(itemServerUrl, privacy: .public)") @@ -101,7 +98,6 @@ extension Enumerator { metadatas, newMetadatas, updatedMetadatas, deletedMetadatas, readError ) = await Self.readServerUrl( itemServerUrl, - ncAccount: ncAccount, remoteInterface: remoteInterface, dbManager: dbManager, domain: domain, @@ -160,7 +156,7 @@ extension Enumerator { Self.logger.info( """ Finished reading serverUrl: \(itemServerUrl, privacy: .public) - for user: \(ncAccount.ncKitAccount, privacy: .public) + for user: \(remoteInterface.account.ncKitAccount, privacy: .public) """ ) @@ -170,7 +166,7 @@ extension Enumerator { Self.logger.warning( """ Nil metadatas received in change read at \(itemServerUrl, privacy: .public) - for user: \(ncAccount.ncKitAccount, privacy: .public) + for user: \(remoteInterface.account.ncKitAccount, privacy: .public) """ ) } @@ -181,7 +177,7 @@ extension Enumerator { Self.logger.warning( """ Nil new metadatas received in change read at \(itemServerUrl, privacy: .public) - for user: \(ncAccount.ncKitAccount, privacy: .public) + for user: \(remoteInterface.account.ncKitAccount, privacy: .public) """ ) } @@ -192,7 +188,7 @@ extension Enumerator { Self.logger.warning( """ Nil updated metadatas received in change read at \(itemServerUrl, privacy: .public) - for user: \(ncAccount.ncKitAccount, privacy: .public) + for user: \(remoteInterface.account.ncKitAccount, privacy: .public) """ ) } @@ -203,7 +199,7 @@ extension Enumerator { Self.logger.warning( """ Nil deleted metadatas received in change read at \(itemServerUrl, privacy: .public) - for user: \(ncAccount.ncKitAccount, privacy: .public) + for user: \(remoteInterface.account.ncKitAccount, privacy: .public) """ ) } @@ -246,7 +242,6 @@ extension Enumerator { ) let childScanResult = await scanRecursively( childDirectory, - ncAccount: ncAccount, remoteInterface: remoteInterface, dbManager: dbManager, scanChangesOnly: scanChangesOnly @@ -323,7 +318,6 @@ extension Enumerator { static func readServerUrl( _ serverUrl: String, - ncAccount: Account, remoteInterface: RemoteInterface, dbManager: FilesDatabaseManager, domain: NSFileProviderDomain? = nil, @@ -337,12 +331,13 @@ extension Enumerator { deletedMetadatas: [ItemMetadata]?, readError: NKError? ) { + let ncAccount = remoteInterface.account let ncKitAccount = ncAccount.ncKitAccount Self.logger.debug( """ Starting to read serverUrl: \(serverUrl, privacy: .public) - for user: \(ncAccount.ncKitAccount, privacy: .public) + for user: \(ncKitAccount, privacy: .public) at depth \(depth.rawValue, privacy: .public). username: \(ncAccount.username, privacy: .public), password is empty: \(ncAccount.password == "" ? "EMPTY" : "NOT EMPTY"), diff --git a/Sources/NextcloudFileProviderKit/Enumeration/Enumerator.swift b/Sources/NextcloudFileProviderKit/Enumeration/Enumerator.swift index 79ed8aa..4fdc677 100644 --- a/Sources/NextcloudFileProviderKit/Enumeration/Enumerator.swift +++ b/Sources/NextcloudFileProviderKit/Enumeration/Enumerator.swift @@ -29,8 +29,8 @@ public class Enumerator: NSObject, NSFileProviderEnumerator { private let anchor = NSFileProviderSyncAnchor(Date().description.data(using: .utf8)!) private static let maxItemsPerFileProviderPage = 100 static let logger = Logger(subsystem: Logger.subsystem, category: "enumerator") - let ncAccount: Account let remoteInterface: RemoteInterface + let ncKitAccount: String let fastEnumeration: Bool var serverUrl: String = "" var isInvalidated = false @@ -42,7 +42,6 @@ public class Enumerator: NSObject, NSFileProviderEnumerator { public init( enumeratedItemIdentifier: NSFileProviderItemIdentifier, - ncAccount: Account, remoteInterface: RemoteInterface, dbManager: FilesDatabaseManager = .shared, domain: NSFileProviderDomain? = nil, @@ -50,8 +49,8 @@ public class Enumerator: NSObject, NSFileProviderEnumerator { listener: EnumerationListener? = nil ) { self.enumeratedItemIdentifier = enumeratedItemIdentifier - self.ncAccount = ncAccount self.remoteInterface = remoteInterface + self.ncKitAccount = remoteInterface.account.ncKitAccount self.dbManager = dbManager self.domain = domain self.fastEnumeration = fastEnumeration @@ -61,7 +60,7 @@ public class Enumerator: NSObject, NSFileProviderEnumerator { Self.logger.debug( "Providing enumerator for a system defined container: \(enumeratedItemIdentifier.rawValue, privacy: .public)" ) - serverUrl = ncAccount.davFilesUrl + serverUrl = remoteInterface.account.davFilesUrl } else { Self.logger.debug( "Providing enumerator for item with identifier: \(enumeratedItemIdentifier.rawValue, privacy: .public)" @@ -80,7 +79,10 @@ public class Enumerator: NSObject, NSFileProviderEnumerator { } Self.logger.info( - "Set up enumerator for user: \(self.ncAccount.ncKitAccount, privacy: .public) with serverUrl: \(self.serverUrl, privacy: .public)" + """ + Set up enumerator for user: \(self.ncKitAccount, privacy: .public) + with serverUrl: \(self.serverUrl, privacy: .public) + """ ) super.init() } @@ -101,7 +103,11 @@ public class Enumerator: NSObject, NSFileProviderEnumerator { listener?.enumerationActionStarted(actionId: actionId) Self.logger.debug( - "Received enumerate items request for enumerator with user: \(self.ncAccount.ncKitAccount, privacy: .public) with serverUrl: \(self.serverUrl, privacy: .public)" + """ + Received enumerate items request for enumerator with user: + \(self.ncKitAccount, privacy: .public) + with serverUrl: \(self.serverUrl, privacy: .public) + """ ) /* - inspect the page to determine whether this is an initial or a follow-up request (TODO) @@ -118,7 +124,10 @@ public class Enumerator: NSObject, NSFileProviderEnumerator { if enumeratedItemIdentifier == .trashContainer { Self.logger.debug( - "Enumerating trash set for user: \(self.ncAccount.ncKitAccount, privacy: .public) with serverUrl: \(self.serverUrl, privacy: .public)" + """ + Enumerating trash set for user: \(self.ncKitAccount, privacy: .public) + with serverUrl: \(self.serverUrl, privacy: .public) + """ ) // TODO! @@ -148,20 +157,26 @@ public class Enumerator: NSObject, NSFileProviderEnumerator { || page == NSFileProviderPage.initialPageSortedByName as NSFileProviderPage { Self.logger.debug( - "Enumerating initial page for user: \(self.ncAccount.ncKitAccount, privacy: .public) with serverUrl: \(self.serverUrl, privacy: .public)" + """ + Enumerating initial page for user: \(self.ncKitAccount, privacy: .public) + with serverUrl: \(self.serverUrl, privacy: .public) + """ ) Task { let (metadatas, _, _, _, readError) = await Self.readServerUrl( - serverUrl, - ncAccount: ncAccount, + serverUrl, remoteInterface: remoteInterface, dbManager: dbManager ) guard readError == nil else { Self.logger.error( - "Finishing enumeration for user: \(self.ncAccount.ncKitAccount, privacy: .public) with serverUrl: \(self.serverUrl, privacy: .public) with error \(readError!.errorDescription, privacy: .public)" + """ + "Finishing enumeration for user: \(self.ncKitAccount, privacy: .public) + with serverUrl: \(self.serverUrl, privacy: .public) + with error \(readError!.errorDescription, privacy: .public) + """ ) // TODO: Refactor for conciseness @@ -174,7 +189,11 @@ public class Enumerator: NSObject, NSFileProviderEnumerator { guard let metadatas else { Self.logger.error( - "Finishing enumeration for user: \(self.ncAccount.ncKitAccount, privacy: .public) with serverUrl: \(self.serverUrl, privacy: .public) with invalid metadatas." + """ + Finishing enumeration for user: \(self.ncKitAccount, privacy: .public) + with serverUrl: \(self.serverUrl, privacy: .public) + with invalid metadatas. + """ ) listener?.enumerationActionFailed( actionId: actionId, error: NSFileProviderError(.cannotSynchronize) @@ -184,7 +203,11 @@ public class Enumerator: NSObject, NSFileProviderEnumerator { } Self.logger.info( - "Finished reading serverUrl: \(self.serverUrl, privacy: .public) for user: \(self.ncAccount.ncKitAccount, privacy: .public). Processed \(metadatas.count) metadatas" + """ + Finished reading serverUrl: \(self.serverUrl, privacy: .public) + for user: \(self.ncKitAccount, privacy: .public). + Processed \(metadatas.count) metadatas + """ ) Self.completeEnumerationObserver( @@ -202,7 +225,11 @@ public class Enumerator: NSObject, NSFileProviderEnumerator { let numPage = Int(String(data: page.rawValue, encoding: .utf8)!)! Self.logger.debug( - "Enumerating page \(numPage, privacy: .public) for user: \(self.ncAccount.ncKitAccount, privacy: .public) with serverUrl: \(self.serverUrl, privacy: .public)" + """ + Enumerating page \(numPage, privacy: .public) + for user: \(self.ncKitAccount, privacy: .public) + with serverUrl: \(self.serverUrl, privacy: .public) + """ ) // TODO: Handle paging properly // Self.completeObserver(observer, ncKit: ncKit, numPage: numPage, itemMetadatas: nil) @@ -217,7 +244,11 @@ public class Enumerator: NSObject, NSFileProviderEnumerator { listener?.enumerationActionStarted(actionId: actionId) Self.logger.debug( - "Received enumerate changes request for enumerator for user: \(self.ncAccount.ncKitAccount, privacy: .public) with serverUrl: \(self.serverUrl, privacy: .public)" + """ + Received enumerate changes request for enumerator for user: + \(self.ncKitAccount, privacy: .public) + with serverUrl: \(self.serverUrl, privacy: .public) + """ ) /* - query the server for updates since the passed-in sync anchor (TODO) @@ -231,7 +262,7 @@ public class Enumerator: NSObject, NSFileProviderEnumerator { if enumeratedItemIdentifier == .workingSet { Self.logger.debug( - "Enumerating changes in working set for user: \(self.ncAccount.ncKitAccount, privacy: .public)" + "Enumerating changes in working set for: \(self.ncKitAccount, privacy: .public)" ) // Unlike when enumerating items we can't progressively enumerate items as we need to wait to resolve which items are truly deleted and which @@ -240,7 +271,6 @@ public class Enumerator: NSObject, NSFileProviderEnumerator { let ( _, newMetadatas, updatedMetadatas, deletedMetadatas, error ) = await fullRecursiveScan( - ncAccount: ncAccount, remoteInterface: remoteInterface, dbManager: dbManager, scanChangesOnly: true @@ -250,7 +280,7 @@ public class Enumerator: NSObject, NSFileProviderEnumerator { Self.logger.info( """ Enumerator invalidated during working set change scan. - For user: \(self.ncAccount.ncKitAccount, privacy: .public) + For user: \(self.ncKitAccount, privacy: .public) """ ) listener?.enumerationActionFailed(actionId: actionId, error: NSFileProviderError(.cannotSynchronize)) @@ -262,7 +292,7 @@ public class Enumerator: NSObject, NSFileProviderEnumerator { Self.logger.info( """ Finished recursive change enumeration of working set for user: - \(self.ncAccount.ncKitAccount, privacy: .public) + \(self.ncKitAccount, privacy: .public) with error: \(error!.errorDescription, privacy: .public) """ ) @@ -277,7 +307,7 @@ public class Enumerator: NSObject, NSFileProviderEnumerator { Self.logger.info( """ Finished recursive change enumeration of working set for user: - \(self.ncAccount.ncKitAccount, privacy: .public). Enumerating items. + \(self.ncKitAccount, privacy: .public). Enumerating items. """ ) @@ -295,7 +325,7 @@ public class Enumerator: NSObject, NSFileProviderEnumerator { return } else if enumeratedItemIdentifier == .trashContainer { Self.logger.debug( - "Enumerating changes in trash set for user: \(self.ncAccount.ncKitAccount, privacy: .public)" + "Enumerating changes in trash set for user: \(self.ncKitAccount, privacy: .public)" ) // TODO! @@ -305,7 +335,10 @@ public class Enumerator: NSObject, NSFileProviderEnumerator { } Self.logger.info( - "Enumerating changes for user: \(self.ncAccount.ncKitAccount, privacy: .public) with serverUrl: \(self.serverUrl, privacy: .public)" + """ + Enumerating changes for user: \(self.ncKitAccount, privacy: .public) + with serverUrl: \(self.serverUrl, privacy: .public) + """ ) // No matter what happens here we finish enumeration in some way, either from the error @@ -316,7 +349,6 @@ public class Enumerator: NSObject, NSFileProviderEnumerator { _, newMetadatas, updatedMetadatas, deletedMetadatas, readError ) = await Self.readServerUrl( serverUrl, - ncAccount: ncAccount, remoteInterface: remoteInterface, dbManager: dbManager, stopAtMatchingEtags: true @@ -330,7 +362,11 @@ public class Enumerator: NSObject, NSFileProviderEnumerator { guard readError == nil else { Self.logger.error( - "Finishing enumeration of changes for user: \(self.ncAccount.ncKitAccount, privacy: .public) with serverUrl: \(self.serverUrl, privacy: .public) with error: \(readError!.errorDescription, privacy: .public)" + """ + Finishing enumeration of changes for: \(self.ncKitAccount, privacy: .public) + with serverUrl: \(self.serverUrl, privacy: .public) + with error: \(readError!.errorDescription, privacy: .public) + """ ) let error = readError!.fileProviderError ?? NSFileProviderError(.cannotSynchronize) @@ -390,7 +426,10 @@ public class Enumerator: NSObject, NSFileProviderEnumerator { } Self.logger.info( - "Finished reading serverUrl: \(self.serverUrl, privacy: .public) for user: \(self.ncAccount.ncKitAccount, privacy: .public)" + """ + Finished reading serverUrl: \(self.serverUrl, privacy: .public) + for user: \(self.ncKitAccount, privacy: .public) + """ ) Self.completeChangesObserver( diff --git a/Sources/NextcloudFileProviderKit/Item/Item+Create.swift b/Sources/NextcloudFileProviderKit/Item/Item+Create.swift index b96d9ad..5d98d1d 100644 --- a/Sources/NextcloudFileProviderKit/Item/Item+Create.swift +++ b/Sources/NextcloudFileProviderKit/Item/Item+Create.swift @@ -199,7 +199,6 @@ extension Item { remotePath: String, domain: NSFileProviderDomain? = nil, remoteInterface: RemoteInterface, - ncAccount: Account, progress: Progress, dbManager: FilesDatabaseManager ) async throws -> Item? { @@ -337,10 +336,7 @@ extension Item { // After everything, check into what the final state is of each folder now Self.logger.debug("Reading bpi folder at: \(remoteDirectoryPath, privacy: .public)") let (_, _, _, _, readError) = await Enumerator.readServerUrl( - remoteDirectoryPath, - ncAccount: ncAccount, - remoteInterface: remoteInterface, - dbManager: dbManager + remoteDirectoryPath, remoteInterface: remoteInterface, dbManager: dbManager ) if let readError, readError != .success { @@ -355,14 +351,14 @@ extension Item { } guard let bundleRootMetadata = dbManager.itemMetadata( - account: ncAccount.ncKitAccount, locatedAtRemoteUrl: remotePath + account: remoteInterface.account.ncKitAccount, locatedAtRemoteUrl: remotePath ) else { Self.logger.error( """ Could not find directory metadata for bundle or package at: \(remotePath, privacy: .public) of account: - \(ncAccount.ncKitAccount, privacy: .public) + \(remoteInterface.account.ncKitAccount, privacy: .public) with contents located at: \(contentsPath, privacy: .public) """ @@ -387,7 +383,6 @@ extension Item { request: NSFileProviderRequest = NSFileProviderRequest(), domain: NSFileProviderDomain? = nil, remoteInterface: RemoteInterface, - ncAccount: Account, progress: Progress, dbManager: FilesDatabaseManager = .shared ) async -> (Item?, Error?) { @@ -416,7 +411,7 @@ extension Item { // TODO: Deduplicate if parentItemIdentifier == .rootContainer { - parentItemRemotePath = ncAccount.davFilesUrl + parentItemRemotePath = remoteInterface.account.davFilesUrl } else { guard let parentItemMetadata = dbManager.directoryMetadata( ocId: parentItemIdentifier.rawValue @@ -493,7 +488,6 @@ extension Item { ) let (metadatas, _, _, _, readError) = await Enumerator.readServerUrl( newServerUrlFileName, - ncAccount: ncAccount, remoteInterface: remoteInterface, dbManager: dbManager, domain: domain, @@ -563,7 +557,6 @@ extension Item { remotePath: newServerUrlFileName, domain: domain, remoteInterface: remoteInterface, - ncAccount: ncAccount, progress: progress, dbManager: dbManager ), nil) diff --git a/Sources/NextcloudFileProviderKit/Item/Item+Fetch.swift b/Sources/NextcloudFileProviderKit/Item/Item+Fetch.swift index 5cfab21..32fcdb4 100644 --- a/Sources/NextcloudFileProviderKit/Item/Item+Fetch.swift +++ b/Sources/NextcloudFileProviderKit/Item/Item+Fetch.swift @@ -28,10 +28,7 @@ public extension Item { while !remoteDirectoryPaths.isEmpty { let remoteDirectoryPath = remoteDirectoryPaths.removeFirst() let (metadatas, _, _, _, readError) = await Enumerator.readServerUrl( - remoteDirectoryPath, - ncAccount: remoteInterface.account, - remoteInterface: remoteInterface, - dbManager: dbManager + remoteDirectoryPath, remoteInterface: remoteInterface, dbManager: dbManager ) if let readError, readError != .success { diff --git a/Sources/NextcloudFileProviderKit/Item/Item+Modify.swift b/Sources/NextcloudFileProviderKit/Item/Item+Modify.swift index 5b3d444..232559e 100644 --- a/Sources/NextcloudFileProviderKit/Item/Item+Modify.swift +++ b/Sources/NextcloudFileProviderKit/Item/Item+Modify.swift @@ -212,7 +212,6 @@ public extension Item { private func modifyBundleOrPackageContents( contents newContents: URL?, remotePath: String, - ncAccount: Account, domain: NSFileProviderDomain?, progress: Progress, dbManager: FilesDatabaseManager @@ -254,10 +253,7 @@ public extension Item { while !directoriesToRead.isEmpty { let remoteDirectoryPath = directoriesToRead.removeFirst() let (metadatas, _, _, _, readError) = await Enumerator.readServerUrl( - remoteDirectoryPath, - ncAccount: ncAccount, - remoteInterface: remoteInterface, - dbManager: dbManager + remoteDirectoryPath, remoteInterface: remoteInterface, dbManager: dbManager ) // Important note -- the enumerator will import found items' metadata into the database. // This is important for when we want to start deleting stale items and want to avoid trying @@ -457,10 +453,7 @@ public extension Item { for remoteDirectoryPath in remoteDirectoriesPaths { // After everything, check into what the final state is of each folder now let (_, _, _, _, readError) = await Enumerator.readServerUrl( - remoteDirectoryPath, - ncAccount: ncAccount, - remoteInterface: remoteInterface, - dbManager: dbManager + remoteDirectoryPath, remoteInterface: remoteInterface, dbManager: dbManager ) if let readError, readError != .success { @@ -502,7 +495,6 @@ public extension Item { contents newContents: URL?, options: NSFileProviderModifyItemOptions = [], request: NSFileProviderRequest = NSFileProviderRequest(), - ncAccount: Account, domain: NSFileProviderDomain? = nil, progress: Progress = .init(), dbManager: FilesDatabaseManager = .shared @@ -537,7 +529,7 @@ public extension Item { // remote changes and then, upon user interaction, will try to modify the item. // That is, if the parent item has changed at all (it might not have) if parentItemIdentifier == .rootContainer { - parentItemServerUrl = ncAccount.davFilesUrl + parentItemServerUrl = remoteInterface.account.davFilesUrl } else { guard let parentItemMetadata = dbManager.directoryMetadata( ocId: parentItemIdentifier.rawValue @@ -650,7 +642,6 @@ public extension Item { contentModifiedItem = try await modifiedItem.modifyBundleOrPackageContents( contents: newContents, remotePath: newServerUrlFileName, - ncAccount: ncAccount, domain: domain, progress: progress, dbManager: dbManager diff --git a/Tests/NextcloudFileProviderKitTests/EnumeratorTests.swift b/Tests/NextcloudFileProviderKitTests/EnumeratorTests.swift index ec272fa..3aa2b88 100644 --- a/Tests/NextcloudFileProviderKitTests/EnumeratorTests.swift +++ b/Tests/NextcloudFileProviderKitTests/EnumeratorTests.swift @@ -93,7 +93,6 @@ final class EnumeratorTests: XCTestCase { let enumerator = Enumerator( enumeratedItemIdentifier: .rootContainer, - ncAccount: Self.account, remoteInterface: remoteInterface, dbManager: Self.dbManager ) @@ -148,7 +147,6 @@ final class EnumeratorTests: XCTestCase { let enumerator = Enumerator( enumeratedItemIdentifier: .workingSet, - ncAccount: Self.account, remoteInterface: remoteInterface, dbManager: Self.dbManager ) @@ -178,7 +176,6 @@ final class EnumeratorTests: XCTestCase { let enumerator = Enumerator( enumeratedItemIdentifier: .workingSet, - ncAccount: Self.account, remoteInterface: remoteInterface, dbManager: Self.dbManager ) @@ -222,7 +219,6 @@ final class EnumeratorTests: XCTestCase { let enumerator = Enumerator( enumeratedItemIdentifier: .workingSet, - ncAccount: Self.account, remoteInterface: remoteInterface, dbManager: Self.dbManager, fastEnumeration: false @@ -269,7 +265,6 @@ final class EnumeratorTests: XCTestCase { let enumerator = Enumerator( enumeratedItemIdentifier: .init(remoteFolder.identifier), - ncAccount: Self.account, remoteInterface: remoteInterface, dbManager: Self.dbManager ) @@ -343,7 +338,6 @@ final class EnumeratorTests: XCTestCase { let enumerator = Enumerator( enumeratedItemIdentifier: .init(remoteItemA.identifier), - ncAccount: Self.account, remoteInterface: remoteInterface, dbManager: Self.dbManager ) @@ -418,7 +412,6 @@ final class EnumeratorTests: XCTestCase { let enumerator = Enumerator( enumeratedItemIdentifier: .init(remoteFolder.identifier), - ncAccount: Self.account, remoteInterface: remoteInterface, dbManager: Self.dbManager ) @@ -555,7 +548,6 @@ final class EnumeratorTests: XCTestCase { let enumerator = Enumerator( enumeratedItemIdentifier: .rootContainer, - ncAccount: Self.account, remoteInterface: remoteInterface, dbManager: Self.dbManager ) @@ -648,7 +640,6 @@ final class EnumeratorTests: XCTestCase { let enumerator = Enumerator( enumeratedItemIdentifier: .init(remoteFolder.identifier), - ncAccount: Self.account, remoteInterface: remoteInterface, dbManager: Self.dbManager ) @@ -722,7 +713,6 @@ final class EnumeratorTests: XCTestCase { let enumerator = Enumerator( enumeratedItemIdentifier: .rootContainer, - ncAccount: Self.account, remoteInterface: remoteInterface, dbManager: Self.dbManager ) @@ -759,7 +749,6 @@ final class EnumeratorTests: XCTestCase { let enumerator = Enumerator( enumeratedItemIdentifier: .workingSet, - ncAccount: Self.account, remoteInterface: remoteInterface, dbManager: Self.dbManager, listener: listener diff --git a/Tests/NextcloudFileProviderKitTests/ItemCreateTests.swift b/Tests/NextcloudFileProviderKitTests/ItemCreateTests.swift index 3b6c716..ec746b4 100644 --- a/Tests/NextcloudFileProviderKitTests/ItemCreateTests.swift +++ b/Tests/NextcloudFileProviderKitTests/ItemCreateTests.swift @@ -57,7 +57,6 @@ final class ItemCreateTests: XCTestCase { basedOn: folderItemTemplate, contents: nil, remoteInterface: remoteInterface, - ncAccount: Self.account, progress: Progress(), dbManager: Self.dbManager ) @@ -106,7 +105,6 @@ final class ItemCreateTests: XCTestCase { basedOn: fileItemTemplate, contents: tempUrl, remoteInterface: remoteInterface, - ncAccount: Self.account, progress: Progress(), dbManager: Self.dbManager ) @@ -154,7 +152,6 @@ final class ItemCreateTests: XCTestCase { basedOn: folderItemTemplate, contents: nil, remoteInterface: remoteInterface, - ncAccount: Self.account, progress: Progress(), dbManager: Self.dbManager ) @@ -184,7 +181,6 @@ final class ItemCreateTests: XCTestCase { basedOn: fileItemTemplate, contents: tempUrl, remoteInterface: remoteInterface, - ncAccount: Self.account, progress: Progress(), dbManager: Self.dbManager ) @@ -300,7 +296,6 @@ final class ItemCreateTests: XCTestCase { basedOn: bundleItemTemplate, contents: tempUrl, remoteInterface: remoteInterface, - ncAccount: Self.account, progress: Progress(), dbManager: Self.dbManager ) diff --git a/Tests/NextcloudFileProviderKitTests/ItemModifyTests.swift b/Tests/NextcloudFileProviderKitTests/ItemModifyTests.swift index ff4f3f7..64316a7 100644 --- a/Tests/NextcloudFileProviderKitTests/ItemModifyTests.swift +++ b/Tests/NextcloudFileProviderKitTests/ItemModifyTests.swift @@ -123,7 +123,6 @@ final class ItemModifyTests: XCTestCase { itemTarget: targetItem, changedFields: [.filename, .contents, .parentItemIdentifier, .contentModificationDate], contents: newContentsUrl, - ncAccount: Self.account, dbManager: Self.dbManager ) XCTAssertNil(error) @@ -587,7 +586,6 @@ final class ItemModifyTests: XCTestCase { itemTarget: targetItem, changedFields: [.filename, .contents, .parentItemIdentifier, .contentModificationDate], contents: tempUrl, - ncAccount: Self.account, dbManager: Self.dbManager ) XCTAssertNil(error)