Lines Matching refs:resolved_path
261 char *tmp, *tmp1, *resolved_path;
267 asprintf(&resolved_path, "%s/%s/", cwd, pathname);
269 asprintf(&resolved_path, "%s/", pathname);
271 if (resolved_path == NULL)
277 while ((tmp = strstr(resolved_path, "//")) != NULL)
280 while ((tmp = strstr(resolved_path, "/./")) != NULL)
283 while ((tmp = strstr(resolved_path, "/../")) != NULL) {
285 if ((tmp1 = strrchr(resolved_path, '/')) == NULL)
286 tmp1 = resolved_path;
290 len = strlen(resolved_path);
291 if (len > 1 && resolved_path[len - 1] == '/')
292 resolved_path[len - 1] = '\0';
294 return resolved_path;