Skip to content

Commit d73df81

Browse files
authored
Merge pull request #77 from claucambra/feature/nckit-6
Prepare for breaking changes in NextcloudKit 6.0
2 parents cdcb255 + b446ae7 commit d73df81

6 files changed

Lines changed: 8 additions & 8 deletions

File tree

Sources/NextcloudFileProviderKit/Enumeration/Enumerator.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ public class Enumerator: NSObject, NSFileProviderEnumerator {
151151
Self.logger.error(
152152
"""
153153
Could not acquire capabilities, cannot check trash.
154-
Error: \(error, privacy: .public)
154+
Error: \(error.errorDescription, privacy: .public)
155155
""")
156156
observer.finishEnumeratingWithError(NSFileProviderError(.serverUnreachable))
157157
return
@@ -415,7 +415,7 @@ public class Enumerator: NSObject, NSFileProviderEnumerator {
415415
Self.logger.error(
416416
"""
417417
Could not acquire capabilities, cannot check trash.
418-
Error: \(error, privacy: .public)
418+
Error: \(error.errorDescription, privacy: .public)
419419
""")
420420
observer.finishEnumeratingWithError(NSFileProviderError(.serverUnreachable))
421421
return

Sources/NextcloudFileProviderKit/Interface/NextcloudKit+RemoteInterface.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,7 @@ extension NextcloudKit: RemoteInterface {
439439
if error != .success {
440440
Logger
441441
.init(subsystem: Logger.subsystem, category: "NextcloudKitRemoteInterface")
442-
.error("Error during sync capabilities fetch: \(error, privacy: .public)")
442+
.error("Error during sync capabilities fetch: \(error.errorDescription, privacy: .public)")
443443
}
444444
capabilities = fetchedCapabilities
445445
semaphore.signal()

Sources/NextcloudFileProviderKit/Item/Item+Modify.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -716,8 +716,8 @@ public extension Item {
716716
Self.logger.error(
717717
"""
718718
Could not acquire capabilities during item move to trash, won't proceed.
719-
Error: \(error, privacy: .public)
720-
Item: \(modifiedItem.filename)
719+
Error: \(error.errorDescription, privacy: .public)
720+
Item: \(modifiedItem.filename, privacy: .public)
721721
"""
722722
)
723723
return (nil, error.fileProviderError)

Tests/Interface/MockRemoteInterface.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -843,7 +843,7 @@ public class MockRemoteInterface: RemoteInterface {
843843
completedChunkTransferSize[remoteChunkStoreFolderName] =
844844
remainingChunks.reduce(0) { $0 + $1.size }
845845

846-
let file = NKFile()
846+
var file = NKFile()
847847
file.fileName = remoteUrl.lastPathComponent
848848
file.etag = etag ?? ""
849849
file.size = size

Tests/Interface/MockRemoteItem.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ public class MockRemoteItem: Equatable {
121121
}
122122

123123
public func toNKFile() -> NKFile {
124-
let file = NKFile()
124+
var file = NKFile()
125125
file.fileName = trashbinOriginalLocation?.split(separator: "/").last?.toString() ?? name
126126
file.size = size
127127
file.date = creationDate

Tests/NextcloudFileProviderKitTests/FilesDatabaseManagerTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -630,7 +630,7 @@ final class FilesDatabaseManagerTests: XCTestCase {
630630
}
631631

632632
func testChildItemsForRootDirectory() throws {
633-
var rootMetadata = SendableItemMetadata(
633+
let rootMetadata = SendableItemMetadata(
634634
ocId: NSFileProviderItemIdentifier.rootContainer.rawValue,
635635
fileName: "",
636636
account: Account(

0 commit comments

Comments
 (0)