1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-06-18 23:07:45 +02:00

All: Add mechanism to lock and upgrade sync targets (#3524)

This commit is contained in:
Laurent
2020-08-02 12:28:50 +01:00
committed by GitHub
parent 88f22fabf7
commit 0c147236a3
138 changed files with 3686 additions and 647 deletions

View File

@ -225,7 +225,10 @@ class OneDriveApi {
// In general, `path` contains a path relative to the base URL, but in some
// cases the full URL is provided (for example, when it's a URL that was
// retrieved from the API).
if (url.indexOf('https://') !== 0) url = `https://graph.microsoft.com/v1.0${path}`;
if (url.indexOf('https://') !== 0) {
const slash = path.indexOf('/') === 0 ? '' : '/';
url = `https://graph.microsoft.com/v1.0${slash}${path}`;
}
if (query) {
url += url.indexOf('?') < 0 ? '?' : '&';