mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-29 10:03:43 +00:00
Return a specific error for EACCES.
This commit is contained in:
parent
8d3a2d5fc5
commit
158c8ba1ee
@ -41,6 +41,7 @@ typedef enum {
|
||||
GIT_EMERGECONFLICT = -13, /*< Merge conflicts prevented operation */
|
||||
GIT_ELOCKED = -14, /*< Lock file prevented operation */
|
||||
GIT_EMODIFIED = -15, /*< Reference value does not match expected */
|
||||
GIT_ENOACCESS = -16, /*< Access denied attempting operation */
|
||||
|
||||
GIT_PASSTHROUGH = -30, /*< Internal only */
|
||||
GIT_ITEROVER = -31, /*< Signals end of iteration with iterator */
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user