refactor(dir-times): extract dir_times_should_capture predicate
Deduplicate the repeated directory-time capture gate (`config->use_metadata && !config->omit_dir_times`) used by the sender-side (multiprocessing.c) and receiver-side (receiver.c) sinks into a single predicate declared next to the DirTimeList machinery in file_receive.h and defined in file_receive.c. Behavior preserved: identical short-circuit condition and semantics, no signature or protocol changes.
This commit is contained in:
@@ -2236,6 +2236,10 @@ File* file_receive(const Config* config, int file_descriptor) {
|
||||
|
||||
/* ---- P7 Wave D: deferred directory times ---- */
|
||||
|
||||
bool dir_times_should_capture(const Config* config) {
|
||||
return config->use_metadata && !config->omit_dir_times;
|
||||
}
|
||||
|
||||
void dir_time_list_init(DirTimeList* list) {
|
||||
if (!list)
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user