1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-06-15 23:00:36 +02:00

All: Fixed: Local items were no longer being deleted via sync. Also fixed Nextcloud sync target.

This commit is contained in:
Laurent Cozic
2018-02-18 21:52:07 +00:00
parent 8f4060999f
commit c46d123503
3 changed files with 21 additions and 8 deletions

View File

@ -236,7 +236,7 @@ class WebDavApi {
// The "solution", an ugly one, is to send a purposely invalid string as eTag, which will bypass the If-None-Match check - Seafile
// finds out that no resource has this ID and simply sends the requested data.
// Also add a random value to make sure the eTag is unique for each call.
if (['GET', 'HEAD'].indexOf(method) < 0) headers['If-None-Match'] = 'JoplinIgnore-' + Math.floor(Math.random() * 100000);
//if (['GET', 'HEAD'].indexOf(method) < 0) headers['If-None-Match'] = 'JoplinIgnore-' + Math.floor(Math.random() * 100000);
const fetchOptions = {};
fetchOptions.headers = headers;
@ -294,7 +294,7 @@ class WebDavApi {
if (json && json['d:error']) {
const code = json['d:error']['s:exception'] ? json['d:error']['s:exception'].join(' ') : response.status;
const message = json['d:error']['s:message'] ? json['d:error']['s:message'].join("\n") : 'Unknown error 1';
throw newError(message, code);
throw newError(message + '(Exception ' + code + ')', response.status);
}
throw newError('Unknown error 2', response.status);