From 16fa22630a3209b11c47aaf3fff0fd681bb936d8 Mon Sep 17 00:00:00 2001 From: marinofaggiana Date: Thu, 28 Jul 2022 15:20:49 +0200 Subject: [PATCH] #2095 Signed-off-by: marinofaggiana --- Nextcloud.xcodeproj/project.pbxproj | 8 ++++---- iOSClient/Networking/NCNetworkingChunkedUpload.swift | 4 +++- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/Nextcloud.xcodeproj/project.pbxproj b/Nextcloud.xcodeproj/project.pbxproj index 3fc660de0b..bb0f1c0362 100644 --- a/Nextcloud.xcodeproj/project.pbxproj +++ b/Nextcloud.xcodeproj/project.pbxproj @@ -2991,7 +2991,7 @@ CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 12; + CURRENT_PROJECT_VERSION = 13; DEVELOPMENT_TEAM = 6JLRKY9ZV7; ENABLE_BITCODE = YES; ENABLE_STRICT_OBJC_MSGSEND = YES; @@ -3054,7 +3054,7 @@ CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 12; + CURRENT_PROJECT_VERSION = 13; DEVELOPMENT_TEAM = 6JLRKY9ZV7; ENABLE_BITCODE = YES; ENABLE_STRICT_OBJC_MSGSEND = YES; @@ -3265,8 +3265,8 @@ isa = XCRemoteSwiftPackageReference; repositoryURL = "https://github.com/nextcloud/ios-communication-library/"; requirement = { - kind = exactVersion; - version = 0.99.7; + branch = feature/timeout; + kind = branch; }; }; F788ECC5263AAAF900ADC67F /* XCRemoteSwiftPackageReference "MarkdownKit" */ = { diff --git a/iOSClient/Networking/NCNetworkingChunkedUpload.swift b/iOSClient/Networking/NCNetworkingChunkedUpload.swift index c3c6febd83..8aef8b9f45 100644 --- a/iOSClient/Networking/NCNetworkingChunkedUpload.swift +++ b/iOSClient/Networking/NCNetworkingChunkedUpload.swift @@ -142,7 +142,9 @@ extension NCNetworking { addCustomHeaders["X-OC-CTime"] = creationDate addCustomHeaders["X-OC-MTime"] = modificationDate - NCCommunication.shared.moveFileOrFolder(serverUrlFileNameSource: serverUrlFileNameSource, serverUrlFileNameDestination: serverUrlFileNameDestination, overwrite: true, addCustomHeaders: addCustomHeaders, queue: DispatchQueue.global(qos: .background)) { _, errorCode, errorDescription in + var timeout: TimeInterval = 60 + + NCCommunication.shared.moveFileOrFolder(serverUrlFileNameSource: serverUrlFileNameSource, serverUrlFileNameDestination: serverUrlFileNameDestination, overwrite: true, addCustomHeaders: addCustomHeaders, timeout: timeout, queue: DispatchQueue.global(qos: .background)) { _, errorCode, errorDescription in NCCommunicationCommon.shared.writeLog("Assembling chunk with error code: \(errorCode)")