1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-12-24 10:27:10 +02:00

Merge pull request #554 from bradmcl/master

Handle Nginx DAV PROPFIND responses correctly
This commit is contained in:
Laurent Cozic 2018-06-10 15:11:38 +01:00 committed by GitHub
commit e3314c859f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -43,6 +43,9 @@ class FileApiDriverWebDav {
const propStat = this.api().arrayFromJson(resource, ['d:propstat']);
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.indexOf('404') >= 0 ) throw new JoplinError(resource, 404);
const resourceTypes = this.api().resourcePropByName(resource, 'array', 'd:resourcetype');
let isDir = false;
if (Array.isArray(resourceTypes)) {