Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
liblongpath-rsync
Project
Project
Details
Activity
Releases
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
liblongpath
liblongpath-rsync
Commits
de219101
Commit
de219101
authored
Sep 20, 2011
by
Wayne Davison
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change stat order for better ELOOP determination.
parent
79853c30
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
7 deletions
+6
-7
syscall.c
syscall.c
+6
-7
No files found.
syscall.c
View file @
de219101
...
...
@@ -464,9 +464,14 @@ int do_open_nofollow(const char *pathname, int flags)
#ifdef O_NOFOLLOW
fd
=
open
(
pathname
,
flags
|
O_NOFOLLOW
);
#else
if
(
do_lstat
(
pathname
,
&
l_st
)
<
0
)
return
-
1
;
if
(
S_ISLNK
(
l_st
.
st_mode
))
{
errno
=
ELOOP
;
return
-
1
;
}
if
((
fd
=
open
(
pathname
,
flags
))
<
0
)
return
fd
;
if
(
do_fstat
(
fd
,
&
f_st
)
<
0
)
{
close_and_return_error:
{
...
...
@@ -476,12 +481,6 @@ int do_open_nofollow(const char *pathname, int flags)
}
return
-
1
;
}
if
(
do_lstat
(
pathname
,
&
l_st
)
<
0
)
goto
close_and_return_error
;
if
(
S_ISLNK
(
l_st
.
st_mode
))
{
errno
=
ELOOP
;
goto
close_and_return_error
;
}
if
(
l_st
.
st_dev
!=
f_st
.
st_dev
||
l_st
.
st_ino
!=
f_st
.
st_ino
)
{
errno
=
EINVAL
;
goto
close_and_return_error
;
...
...
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