diff --git a/ReactNativeClient/lib/file-api-driver-webdav.js b/ReactNativeClient/lib/file-api-driver-webdav.js index 42bcb115a..127b04137 100644 --- a/ReactNativeClient/lib/file-api-driver-webdav.js +++ b/ReactNativeClient/lib/file-api-driver-webdav.js @@ -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;