From e1ed0b1272e301ba0279c3708df98ce8998843fa Mon Sep 17 00:00:00 2001 From: Majid Achhoud Date: Tue, 15 Oct 2024 20:03:52 +0200 Subject: [PATCH] Removed redundant parentheses in conditional statements to fix SwiftLint warnings --- .../CryptomatorCloudAccess/Dropbox/DropboxCloudProvider.swift | 2 +- .../GoogleDrive/GoogleDriveCloudProvider.swift | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Sources/CryptomatorCloudAccess/Dropbox/DropboxCloudProvider.swift b/Sources/CryptomatorCloudAccess/Dropbox/DropboxCloudProvider.swift index 11434cd..cdfd941 100644 --- a/Sources/CryptomatorCloudAccess/Dropbox/DropboxCloudProvider.swift +++ b/Sources/CryptomatorCloudAccess/Dropbox/DropboxCloudProvider.swift @@ -192,7 +192,7 @@ public class DropboxCloudProvider: CloudProvider { } if let networkError = networkError { CloudAccessDDLogDebug("DropboxCloudProvider: fetchItemMetadata(at: \(cloudPath.path)) failed with networkError: \(networkError)") - reject(self.convertRequestError(networkError)) + reject(self.convertRequestError(networkError)) return } guard let result = result else { diff --git a/Sources/CryptomatorCloudAccess/GoogleDrive/GoogleDriveCloudProvider.swift b/Sources/CryptomatorCloudAccess/GoogleDrive/GoogleDriveCloudProvider.swift index b5836e6..7a11d9f 100644 --- a/Sources/CryptomatorCloudAccess/GoogleDrive/GoogleDriveCloudProvider.swift +++ b/Sources/CryptomatorCloudAccess/GoogleDrive/GoogleDriveCloudProvider.swift @@ -533,7 +533,7 @@ public class GoogleDriveCloudProvider: CloudProvider { CloudAccessDDLogDebug("GoogleDriveCloudProvider: executeQuery(\(query.requestID)) failed with error: \(error)") if error.domain == NSURLErrorDomain, error.code == NSURLErrorNotConnectedToInternet || error.code == NSURLErrorCannotConnectToHost || error.code == NSURLErrorNetworkConnectionLost || error.code == NSURLErrorDNSLookupFailed || error.code == NSURLErrorResourceUnavailable || error.code == NSURLErrorInternationalRoamingOff { reject(CloudProviderError.noInternetConnection) - } else if ((error.domain == kGTLRErrorObjectDomain && (error.code == 401 || error.code == 403)) || (error.domain == OIDOAuthTokenErrorDomain && error.code == OIDErrorCodeOAuth.invalidGrant.rawValue)) { + } else if (error.domain == kGTLRErrorObjectDomain && (error.code == 401 || error.code == 403)) || (error.domain == OIDOAuthTokenErrorDomain && error.code == OIDErrorCodeOAuth.invalidGrant.rawValue) { reject(CloudProviderError.unauthorized) } else if error.domain == kGTLRErrorObjectDomain, error.code == 404 { reject(CloudProviderError.itemNotFound)