mirror of
https://github.com/nextcloud/android.git
synced 2024-11-29 02:38:58 +03:00
Merge pull request #8554 from nextcloud/correctEtagCheck
Correct etag check/store when it has changed
This commit is contained in:
commit
9b1d03181c
1 changed files with 6 additions and 1 deletions
|
@ -243,6 +243,8 @@ public class RefreshFolderOperation extends RemoteOperation {
|
|||
if (result.isSuccess()) {
|
||||
// request for the synchronization of KEPT-IN-SYNC file contents
|
||||
startContentSynchronizations(mFilesToSyncContents);
|
||||
} else {
|
||||
mLocalFolder.setEtag("");
|
||||
}
|
||||
|
||||
mLocalFolder.setLastSyncDateForData(System.currentTimeMillis());
|
||||
|
@ -370,7 +372,7 @@ public class RefreshFolderOperation extends RemoteOperation {
|
|||
// check if remote and local folder are different
|
||||
String remoteFolderETag = remoteFolder.getEtag();
|
||||
if (remoteFolderETag != null) {
|
||||
mRemoteFolderChanged = !(remoteFolderETag.equalsIgnoreCase(mLocalFolder.getEtagOnServer()));
|
||||
mRemoteFolderChanged = !(remoteFolderETag.equalsIgnoreCase(mLocalFolder.getEtag()));
|
||||
} else {
|
||||
Log_OC.e(TAG, "Checked " + mAccount.name + remotePath + ": No ETag received from server");
|
||||
}
|
||||
|
@ -464,6 +466,9 @@ public class RefreshFolderOperation extends RemoteOperation {
|
|||
// update richWorkspace
|
||||
mLocalFolder.setRichWorkspace(remoteFolder.getRichWorkspace());
|
||||
|
||||
// update eTag
|
||||
mLocalFolder.setEtag(remoteFolder.getEtag());
|
||||
|
||||
DecryptedFolderMetadata metadata = getDecryptedFolderMetadata(encryptedAncestor,
|
||||
mLocalFolder,
|
||||
getClient(),
|
||||
|
|
Loading…
Reference in a new issue