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
5daca042
Commit
5daca042
authored
Aug 03, 2012
by
Vicent Marti
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
filebuf: Check the return value for `close`
parent
d96c3863
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
src/filebuf.c
+7
-2
No files found.
src/filebuf.c
View file @
5daca042
...
...
@@ -319,10 +319,15 @@ int git_filebuf_commit(git_filebuf *file, mode_t mode)
if
(
verify_last_error
(
file
)
<
0
)
goto
on_error
;
p_close
(
file
->
fd
);
file
->
fd
=
-
1
;
file
->
fd_is_open
=
false
;
if
(
p_close
(
file
->
fd
)
<
0
)
{
giterr_set
(
GITERR_OS
,
"Failed to close file at '%s'"
,
file
->
path_lock
);
goto
on_error
;
}
file
->
fd
=
-
1
;
if
(
p_chmod
(
file
->
path_lock
,
mode
))
{
giterr_set
(
GITERR_OS
,
"Failed to set attributes for file at '%s'"
,
file
->
path_lock
);
goto
on_error
;
...
...
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