1
0
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:
bradmcl 2018-06-10 10:04:52 -04:00 committed by GitHub
parent 281e36fde7
commit 8f794fdbc6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -44,7 +44,7 @@ class FileApiDriverWebDav {
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]);
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');
let isDir = false;