Skip to content

Commit 8fee54c

Browse files
committed
Apply serverUrl at the object instance level if necessary in enumerator when handling working set folders
Signed-off-by: Claudio Cambra <developer@claudiocambra.com>
1 parent 87dbd90 commit 8fee54c

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

Sources/NextcloudFileProviderKit/Enumeration/Enumerator.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,6 @@ public class Enumerator: NSObject, NSFileProviderEnumerator {
220220
)
221221

222222
Task {
223-
var serverUrl = serverUrl // The url that will be scanned
224223
var providedPage: NSFileProviderPage? = nil // Used for pagination token sent to server
225224
var pageNum = pageNum // If we are paginating a new target server URL, reset to 0
226225
// Do not pass in the NSFileProviderPage default pages, these are not valid Nextcloud
@@ -236,6 +235,9 @@ public class Enumerator: NSObject, NSFileProviderEnumerator {
236235
in: pageString, options: [], range: .init(location: 0, length: pageString.count)
237236
).isEmpty
238237
{
238+
Self.logger.info(
239+
"Setting enumerator server URL to \(self.serverUrl, privacy: .public)"
240+
)
239241
serverUrl = pageString
240242
pageNum = 0
241243
} else {

0 commit comments

Comments
 (0)