mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Cloud storage: sync the remote after save
This change once again tests if the remote can be reached. Even with a fairly big data file and a medium speed internet connection the remote sync is fast enough to call it nearly instantaneous. Maybe a couple of seconds. We may need more checks / different heuristics / warnings if the sync didn't happen, etc. But for now this should allow more reasonable testing. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
492369b312
commit
e21cae2d46
5 changed files with 41 additions and 22 deletions
|
@ -637,12 +637,12 @@ int save_dives_logic(const char *filename, const bool select_only)
|
|||
struct membuffer buf = { 0 };
|
||||
FILE *f;
|
||||
void *git;
|
||||
const char *branch;
|
||||
const char *branch, *remote;
|
||||
int error;
|
||||
|
||||
git = is_git_repository(filename, &branch);
|
||||
git = is_git_repository(filename, &branch, &remote);
|
||||
if (git)
|
||||
return git_save_dives(git, branch, select_only);
|
||||
return git_save_dives(git, branch, remote, select_only);
|
||||
|
||||
try_to_backup(filename);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue