mirror of
https://github.com/laurent22/joplin.git
synced 2024-11-30 08:26:59 +02:00
Merge branch 'master' of github.com:laurent22/joplin
This commit is contained in:
commit
1841c4dc11
@ -17,11 +17,11 @@
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>10.0.22</string>
|
||||
<string>10.0.24</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>22</string>
|
||||
<string>24</string>
|
||||
<key>LSRequiresIPhoneOS</key>
|
||||
<true/>
|
||||
<key>NSAppTransportSecurity</key>
|
||||
|
@ -100,6 +100,8 @@ class DropboxApi {
|
||||
isTokenError(status, responseText) {
|
||||
if (status === 401) return true;
|
||||
if (responseText.indexOf('OAuth 2 access token is malformed') >= 0) return true;
|
||||
// eg. Error: POST files/create_folder_v2: Error (400): Error in call to API function "files/create_folder_v2": Must provide HTTP header "Authorization" or URL parameter "authorization".
|
||||
if (responseText.indexOf('Must provide HTTP header "Authorization"') >= 0) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -211,4 +213,4 @@ class DropboxApi {
|
||||
|
||||
}
|
||||
|
||||
module.exports = DropboxApi;
|
||||
module.exports = DropboxApi;
|
||||
|
@ -49,7 +49,7 @@ class SyncTargetDropbox extends BaseSyncTarget {
|
||||
});
|
||||
|
||||
api.on('authRefreshed', (auth) => {
|
||||
this.logger().info('Saving updated OneDrive auth.');
|
||||
this.logger().info('Saving updated Dropbox auth.');
|
||||
Setting.setValue('sync.' + SyncTargetDropbox.id() + '.auth', auth ? auth : null);
|
||||
});
|
||||
|
||||
@ -70,4 +70,4 @@ class SyncTargetDropbox extends BaseSyncTarget {
|
||||
|
||||
}
|
||||
|
||||
module.exports = SyncTargetDropbox;
|
||||
module.exports = SyncTargetDropbox;
|
||||
|
@ -299,6 +299,11 @@ class FileApiDriverWebDav {
|
||||
|
||||
async mkdir(path) {
|
||||
try {
|
||||
// RFC wants this, and so does NGINX. Not having the trailing slash means that some
|
||||
// WebDAV implementations will redirect to a URL with "/". However, when doing so
|
||||
// in React Native, the auth headers, etc. are lost so we need to avoid this.
|
||||
// https://github.com/facebook/react-native/issues/929
|
||||
if (!path.endsWith('/')) path = path + '/';
|
||||
await this.api().exec('MKCOL', path);
|
||||
} catch (error) {
|
||||
if (error.code === 405) return; // 405 means that the collection already exists (Method Not Allowed)
|
||||
@ -345,4 +350,4 @@ class FileApiDriverWebDav {
|
||||
|
||||
}
|
||||
|
||||
module.exports = { FileApiDriverWebDav };
|
||||
module.exports = { FileApiDriverWebDav };
|
||||
|
Loading…
Reference in New Issue
Block a user