Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
git2
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
git2
Commits
a62ad3c3
Commit
a62ad3c3
authored
Mar 05, 2014
by
Vicent Marti
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2164 from libgit2/cmn/refs-delete-iteration
refdb: catch a directory disappearing
parents
967d3f2e
a213a7bf
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
2 deletions
+13
-2
src/path.c
+3
-0
src/refdb_fs.c
+10
-2
No files found.
src/path.c
View file @
a62ad3c3
...
...
@@ -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
;
}
...
...
src/refdb_fs.c
View file @
a62ad3c3
...
...
@@ -272,9 +272,17 @@ static int _dirent_loose_load(void *payload, git_buf *full_path)
if
(
git__suffixcmp
(
full_path
->
ptr
,
".lock"
)
==
0
)
return
0
;
if
(
git_path_isdir
(
full_path
->
ptr
))
return
git_path_direach
(
if
(
git_path_isdir
(
full_path
->
ptr
))
{
int
error
=
git_path_direach
(
full_path
,
backend
->
direach_flags
,
_dirent_loose_load
,
backend
);
/* Race with the filesystem, ignore it */
if
(
error
==
GIT_ENOTFOUND
)
{
giterr_clear
();
return
0
;
}
return
error
;
}
file_path
=
full_path
->
ptr
+
strlen
(
backend
->
path
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment