mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Cloud storage: warn the user if we are not online
This isn't perfect, but at least tells the user if we weren't able to connect and are working just off the local cache. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
226e9a7e85
commit
bd11988f74
3 changed files with 18 additions and 3 deletions
|
|
@ -262,8 +262,11 @@ int sync_with_remote(git_repository *repo, const char *remote, const char *branc
|
|||
return 0;
|
||||
}
|
||||
|
||||
if (rt == RT_HTTPS && !canReachCloudServer())
|
||||
if (rt == RT_HTTPS && !canReachCloudServer()) {
|
||||
// this is not an error, just a warning message, so return 0
|
||||
report_error("Cannot connect to cloud server, working with local copy");
|
||||
return 0;
|
||||
}
|
||||
#if USE_LIBGIT23_API
|
||||
git_fetch_options opts = GIT_FETCH_OPTIONS_INIT;
|
||||
if (rt == RT_SSH)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue