summaryrefslogtreecommitdiff
path: root/src/fileops.c
diff options
context:
space:
mode:
authorVicent Marti <tanoku@gmail.com>2011-06-28 21:04:59 +0200
committerVicent Marti <tanoku@gmail.com>2011-06-28 21:10:51 +0200
commitab7941b5d97e5b90bebe6278fcf5351b6a4d5262 (patch)
tree1507f4cf8072c62f846d7151d3a617b766d1f04c /src/fileops.c
parent5cf1f909e4e5dc30396dd33fb5f6398b95927f54 (diff)
downloadlibgit2-ab7941b5d97e5b90bebe6278fcf5351b6a4d5262.tar.gz
test: Properly show error messages
Diffstat (limited to 'src/fileops.c')
-rw-r--r--src/fileops.c7
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;
}