You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
50 lines
1.6 KiB
50 lines
1.6 KiB
From 5bbb3baca5f77b0f2148cb3b3efdeda61de4e121 Mon Sep 17 00:00:00 2001
|
|
From: Alexey Berezhok <alexey.berezhok@softline.com>
|
|
Date: Mon, 18 Sep 2023 21:39:04 +0300
|
|
Subject: [PATCH] Fix bug when two accounts of yandex disk displayed as one
|
|
|
|
---
|
|
src/goabackend/goayandexprovider.c | 11 +++++++++--
|
|
1 file changed, 9 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/src/goabackend/goayandexprovider.c b/src/goabackend/goayandexprovider.c
|
|
index acaa599..fc78421 100644
|
|
--- a/src/goabackend/goayandexprovider.c
|
|
+++ b/src/goabackend/goayandexprovider.c
|
|
@@ -99,7 +99,7 @@ get_scope (GoaOAuth2Provider *oauth2_provider)
|
|
static guint
|
|
get_credentials_generation (GoaProvider *provider)
|
|
{
|
|
- return 34;
|
|
+ return 36;
|
|
}
|
|
|
|
static const gchar *
|
|
@@ -225,6 +225,7 @@ build_object (GoaProvider *provider,
|
|
gboolean calendar_enabled;
|
|
gboolean contacts_enabled;
|
|
const gchar *email_address;
|
|
+ gchar *u_name, *u_name_pos;
|
|
|
|
/* Chain up */
|
|
if (!GOA_PROVIDER_CLASS (goa_yandex_provider_parent_class)->build_object (provider,
|
|
@@ -284,8 +285,14 @@ build_object (GoaProvider *provider,
|
|
|
|
/* Files */
|
|
files_enabled = g_key_file_get_boolean (key_file, group, "FilesEnabled", NULL);
|
|
- uri_drive = g_strconcat ("davs://webdav.yandex.ru/", NULL);
|
|
+ u_name = g_strdup(email_address);
|
|
+ u_name_pos = g_utf8_strchr(u_name, -1, '@');
|
|
+ if (u_name_pos){
|
|
+ *u_name_pos = '\0';
|
|
+ }
|
|
+ uri_drive = g_strconcat ("davs://", u_name, "@webdav.yandex.ru/", NULL);
|
|
goa_object_skeleton_attach_files (object, uri_drive, files_enabled, FALSE);
|
|
+ g_free (u_name);
|
|
g_free (uri_drive);
|
|
|
|
|
|
--
|
|
2.39.1
|
|
|