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
2e1fa15f
Commit
2e1fa15f
authored
Jun 05, 2013
by
Vicent Marti
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
I'm a dick
parent
987ab765
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
src/fileops.c
+7
-7
No files found.
src/fileops.c
View file @
2e1fa15f
...
@@ -277,9 +277,9 @@ int git_futils_mkdir(
...
@@ -277,9 +277,9 @@ int git_futils_mkdir(
mode_t
mode
,
mode_t
mode
,
uint32_t
flags
)
uint32_t
flags
)
{
{
int
error
=
-
1
,
tmp
;
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
,
min_root_len
;
char
lastch
,
*
tail
;
char
lastch
,
*
tail
;
/* build path and find "root" where we should start calling mkdir */
/* build path and find "root" where we should start calling mkdir */
...
@@ -316,9 +316,9 @@ int git_futils_mkdir(
...
@@ -316,9 +316,9 @@ int git_futils_mkdir(
root
=
0
;
root
=
0
;
/* make sure mkdir root is at least after filesystem root */
/* make sure mkdir root is at least after filesystem root */
tmp
=
git_path_root
(
make_path
.
ptr
);
min_root_len
=
git_path_root
(
make_path
.
ptr
);
if
(
root
<
tmp
)
if
(
root
<
min_root_len
)
root
=
tmp
;
root
=
min_root_len
;
tail
=
&
make_path
.
ptr
[
root
];
tail
=
&
make_path
.
ptr
[
root
];
...
@@ -357,7 +357,7 @@ int git_futils_mkdir(
...
@@ -357,7 +357,7 @@ int git_futils_mkdir(
* or at the root of a volume. If the path is a dir, just
* or at the root of a volume. If the path is a dir, just
* treat as EEXIST.
* treat as EEXIST.
*/
*/
tmp
=
errno
;
tmp
_errno
=
errno
;
if
(
git_path_isdir
(
make_path
.
ptr
))
{
if
(
git_path_isdir
(
make_path
.
ptr
))
{
already_exists
=
1
;
already_exists
=
1
;
...
@@ -365,7 +365,7 @@ int git_futils_mkdir(
...
@@ -365,7 +365,7 @@ int git_futils_mkdir(
}
}
/* Fall through */
/* Fall through */
errno
=
tmp
;
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