Changeset 1d0281c9 in subsurface


Ignore:
Timestamp:
Mar 28, 2017, 11:12:36 AM (4 weeks ago)
Author:
Dirk Hohndel <dirk@…>
Branches:
master
Children:
bb31c775
Parents:
ec7206a
git-author:
Miika Turkia <miika.turkia@…> (03/28/17 09:34:05)
git-committer:
Dirk Hohndel <dirk@…> (03/28/17 11:12:36)
Message:

Fix a crash when git init fails

This can occur e.g. if directory permissions prevent one from writing to
the local cloud storage directory. (Such a crash was discussed on
mailing list.) The error message on GUI is misleading, claiming that
cloud connection failed...

Signed-off-by: Miika Turkia <miika.turkia@…>
---
We probably should check the return value of other git operations as
well, but going for bare minimum for now.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • core/git-access.c

    rbcad5dd r1d0281c9  
    649649
    650650        int ret = git_repository_init(out, path, bare);
     651        if (ret != 0) {
     652                if (verbose)
     653                        fprintf(stderr, "Initializing git repository failed\n");
     654                return ret;
     655        }
    651656
    652657        git_repository_config(&conf, *out);
Note: See TracChangeset for help on using the changeset viewer.