| 990 | #endif |
| 991 | |
| 992 | void 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 | |
| 1010 | int do_mkdir(char *path, mode_t mode) |
| 1011 | { |
no outgoing calls
no test coverage detected