MCPcopy Create free account
hub / github.com/RsyncProject/rsync / send_if_directory

Function send_if_directory

flist.c:1710–1730  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1708}
1709
1710static void send_if_directory(int f, struct file_list *flist,
1711 struct file_struct *file,
1712 char *fbuf, unsigned int ol,
1713 int flags)
1714{
1715 char is_dot_dir = fbuf[ol-1] == '.' && (ol == 1 || fbuf[ol-2] == '/');
1716
1717 if (S_ISDIR(file->mode)
1718 && !(file->flags & FLAG_MOUNT_DIR) && f_name(file, fbuf)) {
1719 void *save_filters;
1720 unsigned int len = strlen(fbuf);
1721 if (len > 1 && fbuf[len-1] == '/')
1722 fbuf[--len] = '\0';
1723 save_filters = push_local_filters(fbuf, len);
1724 send_directory(f, flist, fbuf, len, flags);
1725 pop_local_filters(save_filters);
1726 fbuf[ol] = '\0';
1727 if (is_dot_dir)
1728 fbuf[ol-1] = '.';
1729 }
1730}
1731
1732static int file_compare(const void *file1, const void *file2)
1733{

Callers 2

send_directoryFunction · 0.85
send_file_listFunction · 0.85

Calls 4

f_nameFunction · 0.85
push_local_filtersFunction · 0.85
send_directoryFunction · 0.85
pop_local_filtersFunction · 0.85

Tested by

no test coverage detected