diff options
author | Carlos Martín Nieto <cmn@elego.de> | 2012-07-21 19:11:42 +0200 |
---|---|---|
committer | Carlos Martín Nieto <cmn@elego.de> | 2012-07-23 15:34:33 +0200 |
commit | 0b956819f69793bddbbf92821c11d6bf784de400 (patch) | |
tree | 752a3d196eaced973217e545c9329936a80bf437 | |
parent | 5d9cfa07ac62ad15ebb669b01e723a990450383e (diff) | |
download | libgit2-0b956819f69793bddbbf92821c11d6bf784de400.tar.gz |
config: set the error code if we can't find the global/system config
-rw-r--r-- | src/fileops.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/fileops.c b/src/fileops.c index 5849b79b2..e936c3e2b 100644 --- a/src/fileops.c +++ b/src/fileops.c @@ -424,6 +424,7 @@ int git_futils_find_system_file(git_buf *path, const char *filename) } if (win32_find_file(path, &root, filename) < 0) { + giterr_set(GITERR_OS, "The system file '%s' doesn't exist", filename); git_buf_clear(path); return GIT_ENOTFOUND; } @@ -438,6 +439,7 @@ int git_futils_find_system_file(git_buf *path, const char *filename) return 0; git_buf_clear(path); + giterr_set(GITERR_OS, "The system file '%s' doesn't exist", filename); return GIT_ENOTFOUND; #endif } @@ -455,6 +457,7 @@ int git_futils_find_global_file(git_buf *path, const char *filename) } if (win32_find_file(path, &root, filename) < 0) { + giterr_set(GITERR_OS, "The global file '%s' doesn't exist", filename); git_buf_clear(path); return GIT_ENOTFOUND; } @@ -473,6 +476,7 @@ int git_futils_find_global_file(git_buf *path, const char *filename) return -1; if (git_path_exists(path->ptr) == false) { + giterr_set(GITERR_OS, "The global file '%s' doesn't exist", filename); git_buf_clear(path); return GIT_ENOTFOUND; } |