diff options
| author | Vicent Marti <tanoku@gmail.com> | 2011-06-28 21:04:59 +0200 |
|---|---|---|
| committer | Vicent Marti <tanoku@gmail.com> | 2011-06-28 21:10:51 +0200 |
| commit | ab7941b5d97e5b90bebe6278fcf5351b6a4d5262 (patch) | |
| tree | 1507f4cf8072c62f846d7151d3a617b766d1f04c /src/fileops.c | |
| parent | 5cf1f909e4e5dc30396dd33fb5f6398b95927f54 (diff) | |
| download | libgit2-ab7941b5d97e5b90bebe6278fcf5351b6a4d5262.tar.gz | |
test: Properly show error messages
Diffstat (limited to 'src/fileops.c')
| -rw-r--r-- | src/fileops.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/fileops.c b/src/fileops.c index 2a5eb74ad..3397aad1d 100644 --- a/src/fileops.c +++ b/src/fileops.c @@ -123,8 +123,7 @@ int gitfo_isdir(const char *path) struct stat st; int len, stat_error; - if (!path) - return git__throw(GIT_ENOTFOUND, "No path given to gitfo_isdir"); + assert(path); len = strlen(path); @@ -140,10 +139,10 @@ int gitfo_isdir(const char *path) } if (stat_error < GIT_SUCCESS) - return git__throw(GIT_ENOTFOUND, "%s does not exist", path); + return GIT_ERROR; if (!S_ISDIR(st.st_mode)) - return git__throw(GIT_ENOTFOUND, "%s is not a directory", path); + return GIT_ERROR; return GIT_SUCCESS; } |
