summaryrefslogtreecommitdiff
path: root/src/path.c
diff options
context:
space:
mode:
authorVicent Marti <vicent@github.com>2014-03-05 21:07:20 +0100
committerVicent Marti <vicent@github.com>2014-03-05 21:07:20 +0100
commita62ad3c353380fb95d0f482859b445d430018aa9 (patch)
treec96ad9be5d46001adce3ca7542572b028c18ceb4 /src/path.c
parent967d3f2e3e81b2f21d2b3dee12c58de35572cecb (diff)
parenta213a7bfa82b7171b90c415cbdb44d469e747ece (diff)
downloadlibgit2-a62ad3c353380fb95d0f482859b445d430018aa9.tar.gz
Merge pull request #2164 from libgit2/cmn/refs-delete-iteration
refdb: catch a directory disappearing
Diffstat (limited to 'src/path.c')
-rw-r--r--src/path.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/path.c b/src/path.c
index 89409eae4..fa800b74c 100644
--- a/src/path.c
+++ b/src/path.c
@@ -853,6 +853,9 @@ int git_path_direach(
if ((dir = opendir(path->ptr)) == NULL) {
giterr_set(GITERR_OS, "Failed to open directory '%s'", path->ptr);
+ if (errno == ENOENT)
+ return GIT_ENOTFOUND;
+
return -1;
}