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
ca947dea
Commit
ca947dea
authored
Jan 10, 2007
by
Wayne Davison
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Moved the code that adds each file's length to stats.total_size
so that the delete code doesn't change the value.
parent
2aea85ab
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
flist.c
flist.c
+7
-7
No files found.
flist.c
View file @
ca947dea
...
...
@@ -548,6 +548,9 @@ static void send_file_entry(int f, struct file_struct *file, int ndx)
the_end:
strlcpy
(
lastname
,
fname
,
MAXPATHLEN
);
if
(
S_ISREG
(
mode
)
||
S_ISLNK
(
mode
))
stats
.
total_size
+=
F_LENGTH
(
file
);
}
static
struct
file_struct
*
recv_file_entry
(
struct
file_list
*
flist
,
...
...
@@ -849,6 +852,9 @@ static struct file_struct *recv_file_entry(struct file_list *flist,
read_buf
(
f
,
bp
,
checksum_len
);
}
if
(
S_ISREG
(
mode
)
||
S_ISLNK
(
mode
))
stats
.
total_size
+=
file_length
;
return
file
;
}
...
...
@@ -1090,9 +1096,6 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
file
->
mode
=
save_mode
;
}
if
(
S_ISREG
(
st
.
st_mode
)
||
S_ISLNK
(
st
.
st_mode
))
stats
.
total_size
+=
st
.
st_size
;
if
(
basename_len
==
0
+
1
)
return
NULL
;
...
...
@@ -1679,9 +1682,6 @@ struct file_list *recv_file_list(int f)
flags
|=
read_byte
(
f
)
<<
8
;
file
=
recv_file_entry
(
flist
,
flags
,
f
);
if
(
S_ISREG
(
file
->
mode
)
||
S_ISLNK
(
file
->
mode
))
stats
.
total_size
+=
F_LENGTH
(
file
);
if
(
incremental
&&
S_ISDIR
(
file
->
mode
))
{
flist_expand
(
dir_flist
);
dir_flist
->
files
[
dir_flist
->
count
++
]
=
file
;
...
...
@@ -2035,7 +2035,7 @@ static void clean_flist(struct file_list *flist, int strip_root, int no_dups)
}
}
}
/* Dump
empty
all remaining empty dirs. */
/* Dump all remaining empty dirs. */
while
(
1
)
{
struct
file_struct
*
fp
=
flist
->
files
[
prev_i
];
if
(
F_DEPTH
(
fp
)
>=
0
)
...
...
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