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
8e15bd87
Commit
8e15bd87
authored
Sep 02, 2009
by
Wayne Davison
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Better compiling if SUPPORT_LINKS is not defined.
parent
4a440e4b
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
6 deletions
+15
-6
generator.c
generator.c
+11
-4
syscall.c
syscall.c
+4
-2
No files found.
generator.c
View file @
8e15bd87
...
...
@@ -874,12 +874,15 @@ static int try_dests_non(struct file_struct *file, char *fname, int ndx,
char
*
cmpbuf
,
stat_x
*
sxp
,
int
itemizing
,
enum
logcode
code
)
{
char
lnk
[
MAXPATHLEN
];
int
best_match
=
-
1
;
int
match_level
=
0
;
enum
nonregtype
type
;
uint32
*
devp
;
int
len
,
j
=
0
;
#ifdef SUPPORT_LINKS
char
lnk
[
MAXPATHLEN
];
int
len
;
#endif
int
j
=
0
;
#ifndef SUPPORT_LINKS
if
(
S_ISLNK
(
file
->
mode
))
...
...
@@ -919,11 +922,13 @@ static int try_dests_non(struct file_struct *file, char *fname, int ndx,
if
(
!
IS_DEVICE
(
sxp
->
st
.
st_mode
))
continue
;
break
;
#ifdef SUPPORT_LINKS
case
TYPE_SYMLINK
:
#ifdef SUPPORT_LINKS
if
(
!
S_ISLNK
(
sxp
->
st
.
st_mode
))
continue
;
break
;
#else
return
-
1
;
#endif
}
if
(
match_level
<
1
)
{
...
...
@@ -939,14 +944,16 @@ static int try_dests_non(struct file_struct *file, char *fname, int ndx,
if
(
sxp
->
st
.
st_rdev
!=
MAKEDEV
(
DEV_MAJOR
(
devp
),
DEV_MINOR
(
devp
)))
continue
;
break
;
#ifdef SUPPORT_LINKS
case
TYPE_SYMLINK
:
#ifdef SUPPORT_LINKS
if
((
len
=
readlink
(
cmpbuf
,
lnk
,
MAXPATHLEN
-
1
))
<=
0
)
continue
;
lnk
[
len
]
=
'\0'
;
if
(
strcmp
(
lnk
,
F_SYMLINK
(
file
))
!=
0
)
continue
;
break
;
#else
return
-
1
;
#endif
}
if
(
match_level
<
2
)
{
...
...
syscall.c
View file @
8e15bd87
...
...
@@ -53,12 +53,14 @@ int do_unlink(const char *fname)
return
unlink
(
fname
);
}
int
do_symlink
(
const
char
*
fname1
,
const
char
*
fname2
)
#ifdef SUPPORT_LINKS
int
do_symlink
(
const
char
*
lnk
,
const
char
*
fname
)
{
if
(
dry_run
)
return
0
;
RETURN_ERROR_IF_RO_OR_LO
;
return
symlink
(
fname1
,
fname2
);
return
symlink
(
lnk
,
fname
);
}
#endif
#ifdef HAVE_LINK
int
do_link
(
const
char
*
fname1
,
const
char
*
fname2
)
...
...
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