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
e236b37f
Commit
e236b37f
authored
Jun 05, 2013
by
Vicent Martí
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1633 from jamill/directory_create_fix
Allow creation of directories under the volume root in Win32
parents
947fad4f
daf98cb2
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
5 deletions
+13
-5
src/fileops.c
+13
-5
No files found.
src/fileops.c
View file @
e236b37f
...
@@ -277,7 +277,7 @@ int git_futils_mkdir(
...
@@ -277,7 +277,7 @@ int git_futils_mkdir(
mode_t
mode
,
mode_t
mode
,
uint32_t
flags
)
uint32_t
flags
)
{
{
int
error
=
-
1
;
int
error
=
-
1
,
tmp_errno
;
git_buf
make_path
=
GIT_BUF_INIT
;
git_buf
make_path
=
GIT_BUF_INIT
;
ssize_t
root
=
0
;
ssize_t
root
=
0
;
char
lastch
,
*
tail
;
char
lastch
,
*
tail
;
...
@@ -345,18 +345,26 @@ int git_futils_mkdir(
...
@@ -345,18 +345,26 @@ int git_futils_mkdir(
already_exists
=
1
;
already_exists
=
1
;
break
;
break
;
#ifdef GIT_WIN32
case
EACCES
:
#endif
case
ENOSYS
:
case
ENOSYS
:
/* Solaris can generate this error if you try to mkdir
/* The following errors can be generated if:
* a path which is already a mount point. In that case,
* EACCES - Win32 can generate this error if you try to mkdir
* the path does already exist; but it's not implied by
* a path which is the root of a volume.
* ENOSYS - Solaris can generate a ENOSYS error if you try to mkdir
* a path which is already a mount point.
* In these cases, the path does already exist; but it's not implied by
* the definition of the error, so let's recheck */
* the definition of the error, so let's recheck */
tmp_errno
=
errno
;
if
(
git_path_isdir
(
make_path
.
ptr
))
{
if
(
git_path_isdir
(
make_path
.
ptr
))
{
already_exists
=
1
;
already_exists
=
1
;
break
;
break
;
}
}
/* Fall through */
/* Fall through */
errno
=
ENOSYS
;
errno
=
tmp_errno
;
default:
default:
giterr_set
(
GITERR_OS
,
"Failed to make directory '%s'"
,
giterr_set
(
GITERR_OS
,
"Failed to make directory '%s'"
,
make_path
.
ptr
);
make_path
.
ptr
);
...
...
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