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
4e9c7fae
Commit
4e9c7fae
authored
Apr 12, 2009
by
Wayne Davison
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
The suffix must be non-empty if the backup-dir is the same as the dest
dir.
parent
3696674b
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
6 deletions
+12
-6
main.c
main.c
+2
-4
options.c
options.c
+10
-2
No files found.
main.c
View file @
4e9c7fae
...
...
@@ -825,10 +825,8 @@ static int do_recv(int f_in, int f_out, char *local_name)
exit_cleanup
(
RERR_SYNTAX
);
if
(
ret
)
rprintf
(
FINFO
,
"Created backup_dir %s
\n
"
,
backup_dir_buf
);
else
if
(
INFO_GTE
(
BACKUP
,
1
))
{
char
*
dir
=
*
backup_dir_buf
?
backup_dir_buf
:
"."
;
rprintf
(
FINFO
,
"backup_dir is %s
\n
"
,
dir
);
}
else
if
(
INFO_GTE
(
BACKUP
,
1
))
rprintf
(
FINFO
,
"backup_dir is %s
\n
"
,
backup_dir_buf
);
}
io_flush
(
NORMAL_FLUSH
);
...
...
options.c
View file @
4e9c7fae
...
...
@@ -2008,13 +2008,21 @@ int parse_arguments(int *argc_p, const char ***argv_p)
"the --backup-dir path is WAY too long.
\n
"
);
return
0
;
}
if
(
backup_dir_len
&&
backup_dir_buf
[
backup_dir_len
-
1
]
!=
'/'
)
{
if
(
!
backup_dir_len
)
{
backup_dir_len
=
-
1
;
backup_dir
=
NULL
;
}
else
if
(
backup_dir_buf
[
backup_dir_len
-
1
]
!=
'/'
)
{
backup_dir_buf
[
backup_dir_len
++
]
=
'/'
;
backup_dir_buf
[
backup_dir_len
]
=
'\0'
;
}
}
if
(
backup_dir
)
{
/* No need for a suffix or a protect rule. */
}
else
if
(
!
backup_suffix_len
&&
(
!
am_server
||
!
am_sender
))
{
snprintf
(
err_buf
,
sizeof
err_buf
,
"--suffix cannot be a null string without --backup-dir
\n
"
);
"--suffix cannot be empty %s
\n
"
,
backup_dir_len
<
0
?
"when --backup-dir is the same as the dest dir"
:
"without a --backup-dir"
);
return
0
;
}
else
if
(
make_backups
&&
delete_mode
&&
!
delete_excluded
&&
!
am_server
)
{
snprintf
(
backup_dir_buf
,
sizeof
backup_dir_buf
,
...
...
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