Merge remote-tracking branch 'origin/feat/ignore-existing' into dev
This commit is contained in:
+6
-4
@@ -75,6 +75,7 @@ static void config_set_defaults(Config* config) {
|
||||
config->human_readable = false;
|
||||
config->eight_bit_output = false;
|
||||
config->existing = false;
|
||||
config->ignore_existing = false;
|
||||
config->update = false;
|
||||
config->inplace = false;
|
||||
config->use_fsync = false;
|
||||
@@ -131,7 +132,8 @@ static bool validate_received_config(const Config* config) {
|
||||
valid_wire_bool(config->safe_links) && valid_wire_bool(config->copy_unsafe_links) &&
|
||||
valid_wire_bool(config->preserve_hard_links) && valid_wire_bool(config->preserve_acls) &&
|
||||
valid_wire_bool(config->preserve_xattrs) && valid_wire_bool(config->preserve_devices) &&
|
||||
valid_wire_bool(config->preserve_sparse) && valid_wire_bool(config->existing) &&
|
||||
valid_wire_bool(config->preserve_sparse) && valid_wire_bool(config->ignore_existing) &&
|
||||
valid_wire_bool(config->existing) &&
|
||||
valid_wire_bool(config->update) && valid_wire_bool(config->inplace) &&
|
||||
valid_wire_bool(config->append) && valid_wire_bool(config->use_fsync) &&
|
||||
valid_wire_bool(config->append_verify) &&
|
||||
@@ -257,7 +259,7 @@ static bool send_file_options(int fd, const Config* c) {
|
||||
}
|
||||
|
||||
static bool send_selection_options(int fd, const Config* c) {
|
||||
return send_int(fd, c->existing) && send_int(fd, c->update) && send_int(fd, c->inplace) &&
|
||||
return send_int(fd, c->ignore_existing) && send_int(fd, c->existing) && send_int(fd, c->update) && send_int(fd, c->inplace) &&
|
||||
send_int(fd, c->append) && send_int(fd, c->use_fsync) &&
|
||||
send_int(fd, c->append_verify) &&
|
||||
send_int(fd, c->delete_excluded) && send_int(fd, c->delete_after) &&
|
||||
@@ -328,9 +330,9 @@ static bool receive_file_options(int fd, Config* c) {
|
||||
}
|
||||
|
||||
static bool receive_selection_options(int fd, Config* c) {
|
||||
bool* flags[] = {&c->existing, &c->update, &c->inplace, &c->append,
|
||||
bool* flags[] = {&c->ignore_existing, &c->existing, &c->update, &c->inplace, &c->append,
|
||||
&c->use_fsync,
|
||||
&c->append_verify, &c->delete_excluded, &c->delete_after};
|
||||
&c->append_verify, &c->delete_excluded, &c->delete_after};
|
||||
for (size_t i = 0; i < sizeof(flags) / sizeof(flags[0]); i++) {
|
||||
if (!receive_wire_bool(fd, flags[i]))
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user