MCPcopy Create free account
hub / github.com/coreutils/coreutils / realpath_canon

Function realpath_canon

src/realpath.c:115–127  ·  view source on GitHub ↗

A wrapper around canonicalize_filename_mode(), to call it twice when in LOGICAL mode. */

Source from the content-addressed store, hash-verified

113/* A wrapper around canonicalize_filename_mode(),
114 to call it twice when in LOGICAL mode. */
115static char *
116realpath_canon (char const *fname, int can_mode)
117{
118 char *can_fname = canonicalize_filename_mode (fname, can_mode);
119 if (logical && can_fname) /* canonicalize again to resolve symlinks. */
120 {
121 can_mode &= ~CAN_NOLINKS;
122 char *can_fname2 = canonicalize_filename_mode (can_fname, can_mode);
123 free (can_fname);
124 return can_fname2;
125 }
126 return can_fname;
127}
128
129/* Test whether canonical prefix is parent or match of path. */
130ATTRIBUTE_PURE

Callers 2

process_pathFunction · 0.85
mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected