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:
commit
e3314c859f
@ -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)) {
|
||||
|
Loading…
Reference in New Issue
Block a user