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
fbcab44b
Commit
fbcab44b
authored
May 14, 2013
by
Brad Morgan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Create directory for symlink before creating symlink
parent
000e6896
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
src/checkout.c
+5
-2
No files found.
src/checkout.c
View file @
fbcab44b
...
...
@@ -764,11 +764,14 @@ cleanup:
}
static
int
blob_content_to_link
(
struct
stat
*
st
,
git_blob
*
blob
,
const
char
*
path
,
int
can_symlink
)
struct
stat
*
st
,
git_blob
*
blob
,
const
char
*
path
,
mode_t
dir_mode
,
int
can_symlink
)
{
git_buf
linktarget
=
GIT_BUF_INIT
;
int
error
;
if
((
error
=
git_futils_mkpath2file
(
path
,
dir_mode
))
<
0
)
return
error
;
if
((
error
=
git_blob__getbuf
(
&
linktarget
,
blob
))
<
0
)
return
error
;
...
...
@@ -914,7 +917,7 @@ static int checkout_blob(
if
(
S_ISLNK
(
file
->
mode
))
error
=
blob_content_to_link
(
&
st
,
blob
,
git_buf_cstr
(
&
data
->
path
),
data
->
can_symlink
);
&
st
,
blob
,
git_buf_cstr
(
&
data
->
path
),
data
->
opts
.
dir_mode
,
data
->
can_symlink
);
else
error
=
blob_content_to_file
(
&
st
,
blob
,
git_buf_cstr
(
&
data
->
path
),
file
->
mode
,
&
data
->
opts
);
...
...
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