import android.accounts.Account;
import android.content.Context;
import android.content.Intent;
-import android.util.Log;
import com.owncloud.android.Log_OC;
import com.owncloud.android.datamodel.DataStorageManager;
} else {
client.exhaustResponse(propfind.getResponseBodyAsStream());
- result = new RemoteOperationResult(false, status);
+ result = new RemoteOperationResult(false, status, propfind.getResponseHeaders());
}
}
// TODO this will be always true after the app is upgraded to database version 2; will result in unnecessary uploads
/// decide action to perform depending upon changes
- if (localChanged && serverChanged) {
+ if (!mLocalFile.getEtag().isEmpty() && localChanged && serverChanged) {
result = new RemoteOperationResult(ResultCode.SYNC_CONFLICT);
} else if (localChanged) {
file.setFileLength(we.contentLength());
file.setMimetype(we.contentType());
file.setModificationTimestamp(we.modifiedTimestamp());
+ file.setEtag(we.etag());
+
return file;
}