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
eb6db16d
Commit
eb6db16d
authored
Apr 20, 2012
by
Sven Strickroth
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
GetFileAttributes does not work for utf-8 encoded paths
Signed-off-by: Sven Strickroth <email@cs-ware.de>
parent
31e80290
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 additions
and
9 deletions
+1
-9
src/path.c
+1
-9
No files found.
src/path.c
View file @
eb6db16d
...
@@ -9,6 +9,7 @@
...
@@ -9,6 +9,7 @@
#include "posix.h"
#include "posix.h"
#ifdef GIT_WIN32
#ifdef GIT_WIN32
#include "win32/dir.h"
#include "win32/dir.h"
#include "win32/posix.h"
#else
#else
#include <dirent.h>
#include <dirent.h>
#endif
#endif
...
@@ -362,20 +363,11 @@ int git_path_exists(const char *path)
...
@@ -362,20 +363,11 @@ int git_path_exists(const char *path)
int
git_path_isdir
(
const
char
*
path
)
int
git_path_isdir
(
const
char
*
path
)
{
{
#ifdef GIT_WIN32
DWORD
attr
=
GetFileAttributes
(
path
);
if
(
attr
==
INVALID_FILE_ATTRIBUTES
)
return
GIT_ERROR
;
return
(
attr
&
FILE_ATTRIBUTE_DIRECTORY
)
?
GIT_SUCCESS
:
GIT_ERROR
;
#else
struct
stat
st
;
struct
stat
st
;
if
(
p_stat
(
path
,
&
st
)
<
GIT_SUCCESS
)
if
(
p_stat
(
path
,
&
st
)
<
GIT_SUCCESS
)
return
GIT_ERROR
;
return
GIT_ERROR
;
return
S_ISDIR
(
st
.
st_mode
)
?
GIT_SUCCESS
:
GIT_ERROR
;
return
S_ISDIR
(
st
.
st_mode
)
?
GIT_SUCCESS
:
GIT_ERROR
;
#endif
}
}
int
git_path_isfile
(
const
char
*
path
)
int
git_path_isfile
(
const
char
*
path
)
...
...
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