summaryrefslogtreecommitdiff
path: root/src/path.c
diff options
context:
space:
mode:
authorAlan Rogers <alan@github.com>2014-05-20 17:40:28 +1000
committerAlan Rogers <alan@github.com>2014-05-20 17:40:28 +1000
commit9055347944ff13fd5e91de0b29caeecb41c8bff4 (patch)
tree9a2eb5844fe910261a6c7d1b148843b26d144e35 /src/path.c
parentdc4906f12aedd608b01d04415fdca838eba045f6 (diff)
downloadlibgit2-9055347944ff13fd5e91de0b29caeecb41c8bff4.tar.gz
Rename GIT_ENOACCESS -> GIT_EUNREADABLE
Diffstat (limited to 'src/path.c')
-rw-r--r--src/path.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/path.c b/src/path.c
index a056f6983..c3487daf2 100644
--- a/src/path.c
+++ b/src/path.c
@@ -560,14 +560,10 @@ int git_path_set_error(int errno_value, const char *path, const char *action)
case EEXIST:
giterr_set(GITERR_OS, "Failed %s - '%s' already exists", action, path);
return GIT_EEXISTS;
-
- case EACCES:
- giterr_set(GITERR_OS, "Failed %s - '%s' permission denied", action, path);
- return GIT_ENOACCESS;
-
+
default:
giterr_set(GITERR_OS, "Could not %s '%s'", action, path);
- return -1;
+ return GIT_EUNREADABLE;
}
}
@@ -1108,12 +1104,13 @@ int git_path_dirload_with_stat(
if ((error = git_buf_joinpath(&full, full.ptr, ps->path)) < 0 ||
(error = git_path_lstat(full.ptr, &ps->st)) < 0) {
- if (error == GIT_ENOTFOUND || error == GIT_ENOACCESS) {
+ if (error == GIT_ENOTFOUND) {
giterr_clear();
error = 0;
git_vector_remove(contents, i--);
continue;
}
+
break;
}