mirror of
https://github.com/laurent22/joplin.git
synced 2024-12-24 10:27:10 +02:00
Search for 404 anywhere in return status
This commit is contained in:
parent
281e36fde7
commit
8f794fdbc6
@ -44,7 +44,7 @@ class FileApiDriverWebDav {
|
|||||||
if (!Array.isArray(propStat)) throw new Error('Invalid WebDAV resource format: ' + JSON.stringify(resource));
|
if (!Array.isArray(propStat)) throw new Error('Invalid WebDAV resource format: ' + JSON.stringify(resource));
|
||||||
|
|
||||||
const httpStatusLine = this.api().stringFromJson(resource, ['d:propstat',0,'d:status', 0]);
|
const httpStatusLine = this.api().stringFromJson(resource, ['d:propstat',0,'d:status', 0]);
|
||||||
if ( typeof httpStatusLine === 'string' && httpStatusLine.split(' ')[1] === '404' ) throw new JoplinError(resource, 404);
|
if ( typeof httpStatusLine === 'string' && httpStatusLine.indexOf('404') >= 0 ) throw new JoplinError(resource, 404);
|
||||||
|
|
||||||
const resourceTypes = this.api().resourcePropByName(resource, 'array', 'd:resourcetype');
|
const resourceTypes = this.api().resourcePropByName(resource, 'array', 'd:resourcetype');
|
||||||
let isDir = false;
|
let isDir = false;
|
||||||
|
Loading…
Reference in New Issue
Block a user