Skip to content

Commit 290764e

Browse files
committed
wip
Signed-off-by: alperozturk96 <alper_ozturk@proton.me>
1 parent fefd79f commit 290764e

1 file changed

Lines changed: 0 additions & 9 deletions

File tree

library/src/main/java/com/owncloud/android/lib/resources/e2ee/LockFileRemoteOperation.kt

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ class LockFileRemoteOperation(
5656
* Returns the final status code and the method used.
5757
*/
5858
private fun executeWithFallback(client: OwnCloudClient): Pair<Int, Utf8PostMethod> {
59-
val v2Counter = counter
6059
val v2Method = buildPostMethod(client, LOCK_FILE_URL_V2).apply {
6160
addRequestHeader("Accept", "application/json, text/plain, */*")
6261
addRequestHeader(CONTENT_TYPE, "application/json")
@@ -77,17 +76,9 @@ class LockFileRemoteOperation(
7776
val needsFallback = (v2Status == HttpStatus.SC_NOT_FOUND || v2Status == HttpStatus.SC_INTERNAL_SERVER_ERROR)
7877
if (!needsFallback) return v2Status to v2Method
7978

80-
// default counter for v1 was -1L
81-
if (v2Counter == 1L) {
82-
counter = -1L
83-
}
84-
8579
v2Method.releaseConnection()
8680
val v1Method = buildPostMethod(client, LOCK_FILE_URL_V1).apply {
8781
addRequestHeader(CONTENT_TYPE, FORM_URLENCODED)
88-
if (counter > 0) {
89-
addRequestHeader(COUNTER_HEADER, counter.toString())
90-
}
9182
}
9283
val v1Status = client.executeMethod(v1Method, sessionTimeOut.readTimeOut, sessionTimeOut.connectionTimeOut)
9384
return v1Status to v1Method

0 commit comments

Comments
 (0)