Commit 90553479 by Alan Rogers

Rename GIT_ENOACCESS -> GIT_EUNREADABLE

parent dc4906f1
...@@ -41,7 +41,7 @@ typedef enum { ...@@ -41,7 +41,7 @@ typedef enum {
GIT_EMERGECONFLICT = -13, /*< Merge conflicts prevented operation */ GIT_EMERGECONFLICT = -13, /*< Merge conflicts prevented operation */
GIT_ELOCKED = -14, /*< Lock file prevented operation */ GIT_ELOCKED = -14, /*< Lock file prevented operation */
GIT_EMODIFIED = -15, /*< Reference value does not match expected */ GIT_EMODIFIED = -15, /*< Reference value does not match expected */
GIT_ENOACCESS = -16, /*< Access denied attempting operation */ GIT_EUNREADABLE = -16, /*< File or folder is unreadable */
GIT_PASSTHROUGH = -30, /*< Internal only */ GIT_PASSTHROUGH = -30, /*< Internal only */
GIT_ITEROVER = -31, /*< Signals end of iteration with iterator */ GIT_ITEROVER = -31, /*< Signals end of iteration with iterator */
......
...@@ -560,14 +560,10 @@ int git_path_set_error(int errno_value, const char *path, const char *action) ...@@ -560,14 +560,10 @@ int git_path_set_error(int errno_value, const char *path, const char *action)
case EEXIST: case EEXIST:
giterr_set(GITERR_OS, "Failed %s - '%s' already exists", action, path); giterr_set(GITERR_OS, "Failed %s - '%s' already exists", action, path);
return GIT_EEXISTS; return GIT_EEXISTS;
case EACCES:
giterr_set(GITERR_OS, "Failed %s - '%s' permission denied", action, path);
return GIT_ENOACCESS;
default: default:
giterr_set(GITERR_OS, "Could not %s '%s'", action, path); 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( ...@@ -1108,12 +1104,13 @@ int git_path_dirload_with_stat(
if ((error = git_buf_joinpath(&full, full.ptr, ps->path)) < 0 || if ((error = git_buf_joinpath(&full, full.ptr, ps->path)) < 0 ||
(error = git_path_lstat(full.ptr, &ps->st)) < 0) { (error = git_path_lstat(full.ptr, &ps->st)) < 0) {
if (error == GIT_ENOTFOUND || error == GIT_ENOACCESS) { if (error == GIT_ENOTFOUND) {
giterr_clear(); giterr_clear();
error = 0; error = 0;
git_vector_remove(contents, i--); git_vector_remove(contents, i--);
continue; continue;
} }
break; break;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment