Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
e2c2daa
Return AFDataResponse from enumerate in remote interface
claucambra May 19, 2025
2104bb6
Add EnumeratorPageResponse
claucambra May 19, 2025
0eb724e
Add EnumeratorPageResponseTests
claucambra May 19, 2025
eb37e87
Add convenience NKRequestOptions extension for paginated requests
claucambra May 19, 2025
c2bba78
Provide some form of valid response data for MockRemoteInterface enum…
claucambra May 19, 2025
eb5a3cc
Give Enumerator's readServerUrl ability to perform paginated propfind
claucambra May 19, 2025
5972f9f
Perform paginated enumeration
claucambra May 19, 2025
016ffcc
Properly implement pagination support in MockEnumerationObserver
claucambra May 19, 2025
1887a31
Implement pagination simulation in MockRemoteInterface
claucambra May 19, 2025
e1df050
Do not pass in NSFileProviderPage default pages as NC pagination tokens
claucambra May 19, 2025
3d0671d
Make enumerator page item count customisable
claucambra May 19, 2025
4b2c3d8
Better track page count in mock enumeration observer
claucambra May 19, 2025
08a5dbd
Fix expected state of mock enumeration observer
claucambra May 19, 2025
46ee971
Fix page item count in response for mock remote interface
claucambra May 19, 2025
4cc96c8
Properly handle paginated reads in enumerator read methods
claucambra May 19, 2025
0461153
Add test for paginated enumeration
claucambra May 19, 2025
12fd939
Add warning comment
claucambra May 19, 2025
8df87f2
Purge fast enumeration
claucambra May 26, 2025
ad647f9
Extract paged read result handling into separate method
claucambra May 26, 2025
6856441
Handle infinite depth paged read results
claucambra May 26, 2025
815ee3c
Perform full depth enumeration for working set
claucambra May 26, 2025
9db4e5e
Fix now invalid error type with latest NextcloudKit
claucambra May 29, 2025
38a6c5e
Upgrade to NextcloudKit 6.0.9
claucambra May 29, 2025
4ad01ce
Fix MockRemoteInterface paginate total returned
claucambra May 29, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ let package = Package(
url: "https://github.com/claucambra/NextcloudCapabilitiesKit.git",
.upToNextMajor(from: "2.3.0")
),
.package(url: "https://github.com/nextcloud/NextcloudKit", from: "5.0.4"),
.package(url: "https://github.com/nextcloud/NextcloudKit", from: "6.0.9"),
.package(url: "https://github.com/realm/realm-swift.git", exact: "20.0.1"),
.package(url: "https://github.com/apple/swift-nio.git", from: "2.0.0")
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,6 @@ public final class FilesDatabaseManager: Sendable {
private func processItemMetadatasToUpdate(
existingMetadatas: Results<RealmItemMetadata>,
updatedMetadatas: [SendableItemMetadata],
updateDirectoryEtags: Bool,
keepExistingDownloadState: Bool
) -> (
newMetadatas: [SendableItemMetadata],
Expand All @@ -268,16 +267,11 @@ public final class FilesDatabaseManager: Sendable {
if existingMetadata.status == Status.normal.rawValue,
!existingMetadata.isInSameDatabaseStoreableRemoteState(updatedMetadata)
{
if updatedMetadata.directory {
if updatedMetadata.serverUrl != existingMetadata.serverUrl
|| updatedMetadata.fileName != existingMetadata.fileName
{
directoriesNeedingRename.append(updatedMetadata)
updatedMetadata.etag = "" // Renaming doesn't change the etag so reset

} else if !updateDirectoryEtags {
updatedMetadata.etag = existingMetadata.etag
}
if updatedMetadata.directory,
updatedMetadata.serverUrl != existingMetadata.serverUrl ||
updatedMetadata.fileName != existingMetadata.fileName
{
directoriesNeedingRename.append(updatedMetadata)
}

if keepExistingDownloadState {
Expand Down Expand Up @@ -305,11 +299,7 @@ public final class FilesDatabaseManager: Sendable {
)
}

} else { // This is a new metadata
if !updateDirectoryEtags, updatedMetadata.directory {
updatedMetadata.etag = ""
}

} else { // This is a new metadata
returningNewMetadatas.append(updatedMetadata)

Self.logger.debug(
Expand All @@ -332,7 +322,6 @@ public final class FilesDatabaseManager: Sendable {
account: String,
serverUrl: String,
updatedMetadatas: [SendableItemMetadata],
updateDirectoryEtags: Bool,
keepExistingDownloadState: Bool
) -> (
newMetadatas: [SendableItemMetadata]?,
Expand Down Expand Up @@ -360,7 +349,6 @@ public final class FilesDatabaseManager: Sendable {
let metadatasToChange = processItemMetadatasToUpdate(
existingMetadatas: existingMetadatas,
updatedMetadatas: updatedMetadatas,
updateDirectoryEtags: updateDirectoryEtags,
keepExistingDownloadState: keepExistingDownloadState
)

Expand Down Expand Up @@ -591,7 +579,7 @@ public final class FilesDatabaseManager: Sendable {
return parentItemIdentifier
}

let (metadatas, _, _, _, error) = await Enumerator.readServerUrl(
let (metadatas, _, _, _, _, error) = await Enumerator.readServerUrl(
metadata.serverUrl,
account: account,
remoteInterface: remoteInterface,
Expand Down
Loading