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

Function trim_trailing_slashes

syscall.c:992–1008  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

990#endif
991
992void trim_trailing_slashes(char *name)
993{
994 int l;
995 /* Some BSD systems cannot make a directory if the name
996 * contains a trailing slash.
997 * <http://www.opensource.apple.com/bugs/X/BSD%20Kernel/2734739.html> */
998
999 /* Don't change empty string; and also we can't improve on
1000 * "/" */
1001
1002 l = strlen(name);
1003 while (l > 1) {
1004 if (name[--l] != '/')
1005 break;
1006 name[l] = '\0';
1007 }
1008}
1009
1010int do_mkdir(char *path, mode_t mode)
1011{

Callers 3

do_mkdirFunction · 0.85
do_mkdir_atFunction · 0.85
mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected