Lines Matching refs:abspath
121 static int shorten_path (char *path, char *abspath) in shorten_path() argument
128 while (abspath && strlen(abspath) > 1 && (p = strstr(path,"../"))) { in shorten_path()
147 a = abspath + strlen(abspath) - 1; in shorten_path()
149 if (a <= abspath) in shorten_path()
152 if (a <= abspath) in shorten_path()
168 static char lpath[PATH_MAX], new[PATH_MAX], abspath[PATH_MAX]; in fix_symlink() local
180 abspath[0] = '\0'; in fix_symlink()
182 strcat(abspath,path); in fix_symlink()
183 c = strlen(abspath); in fix_symlink()
184 if ((c > 0) && (abspath[c-1] == '/')) in fix_symlink()
185 abspath[c-1] = '\0'; /* cut trailing / */ in fix_symlink()
186 if ((p = strrchr(abspath,'/')) != NULL) in fix_symlink()
188 strcat(abspath,"/"); in fix_symlink()
190 strcat(abspath,lpath); in fix_symlink()
191 (void) tidy_path(abspath); in fix_symlink()
194 if (stat(abspath, &stbuf) == -1) { in fix_symlink()
206 lstat(abspath, &lstbuf); /* if the above didn't fail, then this shouldn't */ in fix_symlink()