mirror of
https://github.com/RsyncProject/rsync.git
synced 2026-10-20 21:04:15 -04:00
Moved the --append check so that files that don't need to be transferred
still get their non-content attributes updated, and combining --append with --hard-links will not prevent the discovery of unchanged files.
This commit is contained in:
1 parent
ddaef70ced
commit
022dec7aba
2 files changed
+10
-6
No files matched your search
+4
-3
@@ -1743,9 +1743,6 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
if (append_mode > 0 && sx.st.st_size >= F_LENGTH(file))
|
||||
goto cleanup;
|
||||
|
||||
if (fnamecmp_type <= FNAMECMP_BASIS_DIR_HIGH)
|
||||
;
|
||||
else if (fnamecmp_type == FNAMECMP_FUZZY)
|
||||
@@ -1770,6 +1767,10 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
if (append_mode > 0 && sx.st.st_size >= F_LENGTH(file)) {
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
prepare_to_open:
|
||||
if (partialptr) {
|
||||
sx.st = partial_st;
|
||||
|
||||
@@ -723,9 +723,12 @@ receiving user.
|
||||
dit(bf(--append)) This causes rsync to update a file by appending data onto
|
||||
the end of the file, which presumes that the data that already exists on
|
||||
the receiving side is identical with the start of the file on the sending
|
||||
side. Any files that are the same size or longer on the receiving side
|
||||
are skipped. Files that do not yet exist on the receiving side are
|
||||
transferred, regardless of size. Implies bf(--inplace),
|
||||
side. If a file needs to be transferred and its size on the receiver is
|
||||
the same or longer than the size on the sender, the file is skipped. This
|
||||
does not interfere with the updating of a file's non-content attributes
|
||||
(e.g. permissions, ownership, etc.) when the file does not need to be
|
||||
transferred, nor does it affect the updating of any non-regular files.
|
||||
Implies bf(--inplace),
|
||||
but does not conflict with bf(--sparse) (since it is always extending a
|
||||
file's length).
|
||||
|
||||
|
||||
Reference in new issue
Block a user