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
c6b81a98
Commit
c6b81a98
authored
Sep 09, 1998
by
Andrew Tridgell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
handle OSes where you can't rename a open file in the cleanup code.
parent
e0414f42
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
4 deletions
+13
-4
cleanup.c
cleanup.c
+10
-1
receiver.c
receiver.c
+3
-3
No files found.
cleanup.c
View file @
c6b81a98
...
...
@@ -27,6 +27,8 @@ int cleanup_got_literal=0;
static
char
*
cleanup_fname
;
static
char
*
cleanup_new_fname
;
static
struct
file_struct
*
cleanup_file
;
static
int
cleanup_fd1
,
cleanup_fd2
;
static
struct
map_struct
*
cleanup_buf
;
void
exit_cleanup
(
int
code
)
{
...
...
@@ -37,6 +39,9 @@ void exit_cleanup(int code)
if
(
cleanup_got_literal
&&
cleanup_fname
&&
keep_partial
)
{
char
*
fname
=
cleanup_fname
;
cleanup_fname
=
NULL
;
if
(
cleanup_buf
)
unmap_file
(
cleanup_buf
);
if
(
cleanup_fd1
!=
-
1
)
close
(
cleanup_fd1
);
if
(
cleanup_fd2
!=
-
1
)
close
(
cleanup_fd2
);
finish_transfer
(
cleanup_new_fname
,
fname
,
cleanup_file
);
}
io_flush
();
...
...
@@ -55,9 +60,13 @@ void cleanup_disable(void)
}
void
cleanup_set
(
char
*
fnametmp
,
char
*
fname
,
struct
file_struct
*
file
)
void
cleanup_set
(
char
*
fnametmp
,
char
*
fname
,
struct
file_struct
*
file
,
struct
map_struct
*
buf
,
int
fd1
,
int
fd2
)
{
cleanup_fname
=
fnametmp
;
cleanup_new_fname
=
fname
;
cleanup_file
=
file
;
cleanup_buf
=
buf
;
cleanup_fd1
=
fd1
;
cleanup_fd2
=
fd2
;
}
receiver.c
View file @
c6b81a98
...
...
@@ -398,7 +398,7 @@ int recv_files(int f_in,struct file_list *flist,char *local_name,int f_gen)
continue
;
}
cleanup_set
(
fnametmp
,
fname
,
file
);
cleanup_set
(
fnametmp
,
fname
,
file
,
buf
,
fd1
,
fd2
);
if
(
!
am_server
&&
verbose
)
rprintf
(
FINFO
,
"%s
\n
"
,
fname
);
...
...
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