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
44c26bf2
Commit
44c26bf2
authored
Mar 02, 2006
by
Wayne Davison
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't allow overwriting a non-directory with a directory (just
like cp).
parent
cc8c5057
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
0 deletions
+7
-0
main.c
main.c
+7
-0
No files found.
main.c
View file @
44c26bf2
...
@@ -480,6 +480,13 @@ static char *get_local_name(struct file_list *flist, char *dest_path)
...
@@ -480,6 +480,13 @@ static char *get_local_name(struct file_list *flist, char *dest_path)
" copying more than 1 file
\n
"
);
" copying more than 1 file
\n
"
);
exit_cleanup
(
RERR_FILESELECT
);
exit_cleanup
(
RERR_FILESELECT
);
}
}
/* Caution: flist->count could be 0! */
if
(
flist
->
count
==
1
&&
S_ISDIR
(
flist
->
files
[
0
]
->
mode
))
{
rprintf
(
FERROR
,
"ERROR: cannot overwrite non-directory"
" with a directory
\n
"
);
exit_cleanup
(
RERR_FILESELECT
);
}
}
else
if
(
errno
!=
ENOENT
)
{
}
else
if
(
errno
!=
ENOENT
)
{
rsyserr
(
FERROR
,
errno
,
"cannot stat destination %s"
,
rsyserr
(
FERROR
,
errno
,
"cannot stat destination %s"
,
full_fname
(
dest_path
));
full_fname
(
dest_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