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
339f3d07
Commit
339f3d07
authored
Jul 11, 2012
by
Ben Straub
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move is_dot_or_dotdotW into path.h.
parent
81167385
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
8 deletions
+8
-8
src/path.c
+1
-8
src/path.h
+7
-0
No files found.
src/path.c
View file @
339f3d07
...
...
@@ -391,13 +391,6 @@ bool git_path_isfile(const char *path)
#ifdef GIT_WIN32
static
bool
is_dot_or_dotdotW
(
const
wchar_t
*
name
)
{
return
(
name
[
0
]
==
L'.'
&&
(
name
[
1
]
==
L'\0'
||
(
name
[
1
]
==
L'.'
&&
name
[
2
]
==
L'\0'
)));
}
bool
git_path_is_empty_dir
(
const
char
*
path
)
{
git_buf
pathbuf
=
GIT_BUF_INIT
;
...
...
@@ -418,7 +411,7 @@ bool git_path_is_empty_dir(const char *path)
}
do
{
if
(
!
is_dot_or_dotdotW
(
ffd
.
cFileName
))
{
if
(
!
git_path_
is_dot_or_dotdotW
(
ffd
.
cFileName
))
{
retval
=
false
;
}
}
while
(
FindNextFileW
(
hFind
,
&
ffd
)
!=
0
);
...
...
src/path.h
View file @
339f3d07
...
...
@@ -91,6 +91,13 @@ GIT_INLINE(int) git_path_is_dot_or_dotdot(const char *name)
}
#ifdef GIT_WIN32
GIT_INLINE
(
int
)
git_path_is_dot_or_dotdotW
(
const
wchar_t
*
name
)
{
return
(
name
[
0
]
==
L'.'
&&
(
name
[
1
]
==
L'\0'
||
(
name
[
1
]
==
L'.'
&&
name
[
2
]
==
L'\0'
)));
}
/**
* Convert backslashes in path to forward slashes.
*/
...
...
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