3 int has_symlink_leading_path(const char *name, char *last_symlink)
12 if (last_symlink && *last_symlink) {
13 size_t last_len = strlen(last_symlink);
14 size_t len = strlen(name);
16 !strncmp(name, last_symlink, last_len) &&
17 name[last_len] == '/')
30 if (PATH_MAX <= dp + len - path + 2)
31 return 0; /* new name is longer than that??? */
37 if (S_ISLNK(st.st_mode)) {
39 strcpy(last_symlink, path);