Cloud storage: Unset the proxy if none is configured

The settings are stored in the local cache repository - so without
resetting it a proxy would stay configured even if it was disabled in the
Subsurface preferences.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2015-06-12 06:29:22 -07:00
parent 490d21806e
commit 5e0c546beb

View file

@ -240,11 +240,14 @@ static git_repository *update_local_repo(const char *localdir, const char *remot
else
rt = OTHER;
git_repository_config(&conf, repo);
if (rt == HTTPS && getProxyString(&proxy_string)) {
git_repository_config(&conf, repo);
git_config_set_string(conf, "http.proxy", proxy_string);
free(proxy_string);
} else {
git_config_set_string(conf, "http.proxy", "");
}
/*
* NOTE! Remote errors are reported, but are nonfatal:
* we still successfully return the local repository.