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
c52461f9
Commit
c52461f9
authored
Jul 29, 2004
by
Wayne Davison
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Check the error return of flush_write_file().
parent
7f459268
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
11 deletions
+7
-11
receiver.c
receiver.c
+7
-11
No files found.
receiver.c
View file @
c52461f9
...
...
@@ -247,11 +247,8 @@ static int receive_data(int f_in, char *fname_r, int fd_r, OFF_T size_r,
sum_update
(
data
,
i
);
if
(
fd
!=
-
1
&&
write_file
(
fd
,
data
,
i
)
!=
i
)
{
rsyserr
(
FERROR
,
errno
,
"write failed on %s"
,
full_fname
(
fname
));
exit_cleanup
(
RERR_FILEIO
);
}
if
(
fd
!=
-
1
&&
write_file
(
fd
,
data
,
i
)
!=
i
)
goto
report_write_error
;
offset
+=
i
;
continue
;
}
...
...
@@ -277,7 +274,8 @@ static int receive_data(int f_in, char *fname_r, int fd_r, OFF_T size_r,
if
(
inplace
)
{
if
(
offset
==
offset2
&&
fd
!=
-
1
)
{
flush_write_file
(
fd
);
if
(
flush_write_file
(
fd
)
<
0
)
goto
report_write_error
;
offset
+=
len
;
if
(
do_lseek
(
fd
,
len
,
SEEK_CUR
)
!=
offset
)
{
rsyserr
(
FERROR
,
errno
,
...
...
@@ -288,11 +286,8 @@ static int receive_data(int f_in, char *fname_r, int fd_r, OFF_T size_r,
continue
;
}
}
if
(
fd
!=
-
1
&&
write_file
(
fd
,
map
,
len
)
!=
(
int
)
len
)
{
rsyserr
(
FERROR
,
errno
,
"write failed on %s"
,
full_fname
(
fname
));
exit_cleanup
(
RERR_FILEIO
);
}
if
(
fd
!=
-
1
&&
write_file
(
fd
,
map
,
len
)
!=
(
int
)
len
)
goto
report_write_error
;
offset
+=
len
;
}
...
...
@@ -307,6 +302,7 @@ static int receive_data(int f_in, char *fname_r, int fd_r, OFF_T size_r,
end_progress
(
total_size
);
if
(
fd
!=
-
1
&&
offset
>
0
&&
sparse_end
(
fd
)
!=
0
)
{
report_write_error:
rsyserr
(
FERROR
,
errno
,
"write failed on %s"
,
full_fname
(
fname
));
exit_cleanup
(
RERR_FILEIO
);
...
...
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