summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlan Rogers <alan@github.com>2014-05-15 16:54:46 +1000
committerAlan Rogers <alan@github.com>2014-05-15 16:54:46 +1000
commit158c8ba1ee81fe20d3beb16650f30f3be02054f7 (patch)
treec51113aff1068084dc4d1210b974241aeb8317a5 /src
parent8d3a2d5fc58a08a22e355beaa0f9fc146facc3b3 (diff)
downloadlibgit2-158c8ba1ee81fe20d3beb16650f30f3be02054f7.tar.gz
Return a specific error for EACCES.
Diffstat (limited to 'src')
-rw-r--r--src/path.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/path.c b/src/path.c
index e0b00a086..55790ff7c 100644
--- a/src/path.c
+++ b/src/path.c
@@ -561,6 +561,10 @@ int git_path_set_error(int errno_value, const char *path, const char *action)
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;