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:
Dirk Hohndel 2015-06-15 06:05:00 -07:00
parent 617b105458
commit c593dea119
6 changed files with 12 additions and 13 deletions

3
file.c
View file

@ -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;