MCPcopy Index your code
hub / github.com/RsyncProject/rsync / f_name

Function f_name

flist.c:3395–3412  ·  view source on GitHub ↗

Return a copy of the full filename of a flist entry, using the indicated * buffer or one of 5 static buffers if fbuf is NULL. No size-checking is * done because we checked the size when creating the file_struct entry. */

Source from the content-addressed store, hash-verified

3393 * done because we checked the size when creating the file_struct entry.
3394 */
3395char *f_name(const struct file_struct *f, char *fbuf)
3396{
3397 if (!f || !F_IS_ACTIVE(f))
3398 return NULL;
3399
3400 if (!fbuf)
3401 fbuf = f_name_buf();
3402
3403 if (f->dirname) {
3404 int len = strlen(f->dirname);
3405 memcpy(fbuf, f->dirname, len);
3406 fbuf[len] = '/';
3407 strlcpy(fbuf + len + 1, f->basename, MAXPATHLEN - (len + 1));
3408 } else
3409 strlcpy(fbuf, f->basename, MAXPATHLEN);
3410
3411 return fbuf;
3412}
3413
3414/* Do a non-recursive scan of the named directory, possibly ignoring all
3415 * exclude rules except for the daemon's. If "dlen" is >=0, it is the length

Callers 15

successful_sendFunction · 0.85
send_filesFunction · 0.85
hard_link_checkFunction · 0.85
finish_hard_linkFunction · 0.85
log_formattedFunction · 0.85
send_file_nameFunction · 0.85
send_if_directoryFunction · 0.85
send1extraFunction · 0.85
recv_file_listFunction · 0.85
flist_sort_and_cleanFunction · 0.85
delete_in_dirFunction · 0.85
do_delete_passFunction · 0.85

Calls 2

f_name_bufFunction · 0.85
strlcpyFunction · 0.85

Tested by

no test coverage detected