| 864 | } |
| 865 | |
| 866 | static int |
| 867 | firstIsParentOrSameDirOfSecond(const char* firstDir, const char* secondDir) |
| 868 | { |
| 869 | size_t firstDirLen = strlen(firstDir), |
| 870 | secondDirLen = strlen(secondDir); |
| 871 | return firstDirLen <= secondDirLen && |
| 872 | (secondDir[firstDirLen] == PATH_SEP || secondDir[firstDirLen] == '\0') && |
| 873 | 0 == strncmp(firstDir, secondDir, firstDirLen); |
| 874 | } |
| 875 | |
| 876 | static int compareDir(const void* pathname1, const void* pathname2) { |
| 877 | /* sort it after remove the leading '/' or './'*/ |
no test coverage detected