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
a4453606
Commit
a4453606
authored
Sep 18, 2007
by
Wayne Davison
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Improved -s support.
- Handle setup_iconv() call in parse_arguments() so it gets set early.
parent
71605b0f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
22 deletions
+30
-22
options.c
options.c
+30
-22
No files found.
options.c
View file @
a4453606
...
@@ -878,7 +878,7 @@ int parse_arguments(int *argc_p, const char ***argv_p, int frommain)
...
@@ -878,7 +878,7 @@ int parse_arguments(int *argc_p, const char ***argv_p, int frommain)
set_refuse_options
(
"log-file*"
);
set_refuse_options
(
"log-file*"
);
#ifdef ICONV_OPTION
#ifdef ICONV_OPTION
if
(
!
am_daemon
&&
(
arg
=
getenv
(
"RSYNC_ICONV"
))
!=
NULL
&&
*
arg
)
if
(
!
am_daemon
&&
!
protect_args
&&
(
arg
=
getenv
(
"RSYNC_ICONV"
))
!=
NULL
&&
*
arg
)
iconv_opt
=
strdup
(
arg
);
iconv_opt
=
strdup
(
arg
);
#endif
#endif
...
@@ -1240,22 +1240,23 @@ int parse_arguments(int *argc_p, const char ***argv_p, int frommain)
...
@@ -1240,22 +1240,23 @@ int parse_arguments(int *argc_p, const char ***argv_p, int frommain)
exit_cleanup
(
0
);
exit_cleanup
(
0
);
}
}
if
(
protect_args
)
{
if
(
!
frommain
)
protect_args
=
0
;
else
if
(
am_server
)
return
1
;
}
#ifdef ICONV_OPTION
#ifdef ICONV_OPTION
if
(
iconv_opt
)
{
if
(
iconv_opt
&&
protect_args
!=
2
)
{
if
(
!
am_server
&&
strcmp
(
iconv_opt
,
"-"
)
==
0
)
if
(
!
am_server
&&
strcmp
(
iconv_opt
,
"-"
)
==
0
)
iconv_opt
=
NULL
;
iconv_opt
=
NULL
;
else
else
need_unsorted_flist
=
1
;
need_unsorted_flist
=
1
;
}
}
setup_iconv
();
#endif
#endif
if
(
protect_args
==
1
)
{
if
(
!
frommain
)
protect_args
=
0
;
else
if
(
am_server
)
return
1
;
}
#ifndef SUPPORT_LINKS
#ifndef SUPPORT_LINKS
if
(
preserve_links
&&
!
am_sender
)
{
if
(
preserve_links
&&
!
am_sender
)
{
snprintf
(
err_buf
,
sizeof
err_buf
,
snprintf
(
err_buf
,
sizeof
err_buf
,
...
@@ -1663,6 +1664,10 @@ void server_options(char **args, int *argc_p)
...
@@ -1663,6 +1664,10 @@ void server_options(char **args, int *argc_p)
x
=
1
;
x
=
1
;
argstr
[
0
]
=
'-'
;
argstr
[
0
]
=
'-'
;
if
(
protect_args
)
argstr
[
x
++
]
=
's'
;
for
(
i
=
0
;
i
<
verbose
;
i
++
)
for
(
i
=
0
;
i
<
verbose
;
i
++
)
argstr
[
x
++
]
=
'v'
;
argstr
[
x
++
]
=
'v'
;
...
@@ -1765,6 +1770,22 @@ void server_options(char **args, int *argc_p)
...
@@ -1765,6 +1770,22 @@ void server_options(char **args, int *argc_p)
if
(
x
!=
1
)
if
(
x
!=
1
)
args
[
ac
++
]
=
argstr
;
args
[
ac
++
]
=
argstr
;
#ifdef ICONV_OPTION
if
(
iconv_opt
)
{
char
*
set
=
strchr
(
iconv_opt
,
','
);
if
(
set
)
set
++
;
else
set
=
iconv_opt
;
if
(
asprintf
(
&
arg
,
"--iconv=%s"
,
set
)
<
0
)
goto
oom
;
args
[
ac
++
]
=
arg
;
}
#endif
if
(
protect_args
)
/* initial args break here */
args
[
ac
++
]
=
NULL
;
if
(
list_only
>
1
)
if
(
list_only
>
1
)
args
[
ac
++
]
=
"--list-only"
;
args
[
ac
++
]
=
"--list-only"
;
...
@@ -1800,19 +1821,6 @@ void server_options(char **args, int *argc_p)
...
@@ -1800,19 +1821,6 @@ void server_options(char **args, int *argc_p)
args
[
ac
++
]
=
"--log-format=X"
;
args
[
ac
++
]
=
"--log-format=X"
;
}
}
#ifdef ICONV_OPTION
if
(
iconv_opt
)
{
char
*
set
=
strchr
(
iconv_opt
,
','
);
if
(
set
)
set
++
;
else
set
=
iconv_opt
;
if
(
asprintf
(
&
arg
,
"--iconv=%s"
,
set
)
<
0
)
goto
oom
;
args
[
ac
++
]
=
arg
;
}
#endif
if
(
block_size
)
{
if
(
block_size
)
{
if
(
asprintf
(
&
arg
,
"-B%lu"
,
block_size
)
<
0
)
if
(
asprintf
(
&
arg
,
"-B%lu"
,
block_size
)
<
0
)
goto
oom
;
goto
oom
;
...
...
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