mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Cloud storage: use preference member instead of hard coded strings
This creates the basis to allow other backends to be used with the cloud storage infrastructure. So far this should all just transparently continue to work. A user would have to manually add the cloud_base_url entry to the CloudStorage section in their config file in order to use a different backend server. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
617b105458
commit
c593dea119
6 changed files with 12 additions and 13 deletions
3
file.c
3
file.c
|
@ -428,8 +428,7 @@ int parse_file(const char *filename)
|
|||
int ret;
|
||||
|
||||
git = is_git_repository(filename, &branch, NULL);
|
||||
if (strstr(filename, "https://cloud.subsurface-divelog.org/git")
|
||||
&& git == dummy_git_repository)
|
||||
if (strstr(filename, prefs.cloud_git_url) && git == dummy_git_repository)
|
||||
/* opening the cloud storage repository failed for some reason
|
||||
* give up here and don't send errors about git repositories */
|
||||
return 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue