summaryrefslogtreecommitdiff
path: root/src/fileops.c
diff options
context:
space:
mode:
authorVicent Martí <tanoku@gmail.com>2012-05-18 01:21:06 +0200
committerVicent Martí <tanoku@gmail.com>2012-05-18 01:26:26 +0200
commite172cf082e62aa421703080d0bccb7b8762c8bd4 (patch)
treec19f7b1be056a9176d4e865f5be5c69a5c2912c6 /src/fileops.c
parent2e2e97858de18abd43f7e59fcc6151510c6d3272 (diff)
downloadlibgit2-e172cf082e62aa421703080d0bccb7b8762c8bd4.tar.gz
errors: Rename the generic return codes
Diffstat (limited to 'src/fileops.c')
-rw-r--r--src/fileops.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/fileops.c b/src/fileops.c
index ee9d4212d..c467143e4 100644
--- a/src/fileops.c
+++ b/src/fileops.c
@@ -95,7 +95,7 @@ int git_futils_open_ro(const char *path)
int fd = p_open(path, O_RDONLY);
if (fd < 0) {
if (errno == ENOENT)
- fd = GIT_ENOTFOUND;
+ fd = GIT_NOTFOUND;
giterr_set(GITERR_OS, "Failed to open '%s'", path);
}
return fd;
@@ -365,7 +365,7 @@ int git_futils_find_global_file(git_buf *path, const char *filename)
if (git_path_exists(path->ptr) == false) {
git_buf_clear(path);
- return GIT_ENOTFOUND;
+ return GIT_NOTFOUND;
}
return 0;
@@ -414,7 +414,7 @@ static int win32_find_system_file(git_buf *path, const char *filename)
char *file_utf8 = NULL;
if (!root || !filename || (len = strlen(filename)) == 0)
- return GIT_ENOTFOUND;
+ return GIT_NOTFOUND;
/* allocate space for wchar_t path to file */
file_utf16 = git__calloc(root->len + len + 2, sizeof(wchar_t));
@@ -438,7 +438,7 @@ static int win32_find_system_file(git_buf *path, const char *filename)
/* check access */
if (_waccess(file_utf16, F_OK) < 0) {
- error = GIT_ENOTFOUND;
+ error = GIT_NOTFOUND;
goto cleanup;
}
@@ -470,6 +470,6 @@ int git_futils_find_system_file(git_buf *path, const char *filename)
#ifdef GIT_WIN32
return win32_find_system_file(path, filename);
#else
- return GIT_ENOTFOUND;
+ return GIT_NOTFOUND;
#endif
}