Skip to content

Commit eb1d4eb

Browse files
clean
Signed-off-by: Marino Faggiana <marino.faggiana@nextcloud.com>
1 parent f2941a7 commit eb1d4eb

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

Sources/NextcloudKit/NextcloudKit+WebDAV.swift

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -770,10 +770,16 @@ public extension NextcloudKit {
770770
guard let lessDateString, let greaterDateString else {
771771
return options.queue.async { completion(account, files, nil, .invalidDate) }
772772
}
773-
guard let httpBody = String(format: NKDataFileXML(nkCommonInstance: self.nkCommonInstance).getRequestBodySearchMedia(createProperties: options.createProperties, removeProperties: options.removeProperties), href, elementDate, elementDate, lessDateString, elementDate, greaterDateString, String(limit)).data(using: .utf8) else {
774-
return options.queue.async { completion(account, files, nil, .invalidData) }
773+
774+
let httpBodyString = String(format: NKDataFileXML(nkCommonInstance: self.nkCommonInstance).getRequestBodySearchMedia(createProperties: options.createProperties, removeProperties: options.removeProperties), href, elementDate, elementDate, lessDateString, elementDate, greaterDateString, String(limit))
775+
776+
guard let httpBody = httpBodyString.data(using: .utf8) else {
777+
return options.queue.async {
778+
completion(account, files, nil, .invalidData)
779+
}
775780
}
776781

782+
777783
search(serverUrl: nkSession.urlBase, httpBody: httpBody, showHiddenFiles: false, includeHiddenFiles: [], account: account, options: options) { task in
778784
taskHandler(task)
779785
} completion: { account, files, responseData, error in

0 commit comments

Comments
 (0)