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
1e3a639d
Unverified
Commit
1e3a639d
authored
May 12, 2019
by
Edward Thomson
Committed by
GitHub
May 12, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #5065 from danielgindi/feature/win32_symlink_dir
Support symlinks for directories in win32
parents
7f562f2c
336e98bb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
src/win32/posix_w32.c
+7
-2
No files found.
src/win32/posix_w32.c
View file @
1e3a639d
...
...
@@ -397,13 +397,18 @@ int p_readlink(const char *path, char *buf, size_t bufsiz)
int
p_symlink
(
const
char
*
target
,
const
char
*
path
)
{
git_win32_path
target_w
,
path_w
;
DWORD
dwFlags
;
if
(
git_win32_path_from_utf8
(
path_w
,
path
)
<
0
||
git__utf8_to_16
(
target_w
,
MAX_PATH
,
target
)
<
0
)
return
-
1
;
if
(
!
CreateSymbolicLinkW
(
path_w
,
target_w
,
SYMBOLIC_LINK_FLAG_ALLOW_UNPRIVILEGED_CREATE
))
dwFlags
=
SYMBOLIC_LINK_FLAG_ALLOW_UNPRIVILEGED_CREATE
;
if
(
GetFileAttributesW
(
target_w
)
&
FILE_ATTRIBUTE_DIRECTORY
)
dwFlags
|=
SYMBOLIC_LINK_FLAG_DIRECTORY
;
if
(
!
CreateSymbolicLinkW
(
path_w
,
target_w
,
dwFlags
))
return
-
1
;
return
0
;
...
...
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