commit - 6e47225242a2b742817ecafa41e4ff88046b7f88
commit + 6876e2035e5226e05e591587b31ab2a9b477034b
blob - 39c436e7f663ea304f8d339f4eebc4f646156e15
blob + 6ea6d7bebdac0acf0c5b36dd4fb07f6b02579e12
--- lib/repository.c
+++ lib/repository.c
{
struct got_repository *repo = NULL;
const struct got_error *err = NULL;
- char *abspath, *normpath = NULL;
+ char *abspath;
int i, tried_root = 0;
*repop = NULL;
if (err)
goto done;
- normpath = got_path_normalize(abspath);
- if (normpath == NULL) {
- err = got_error(GOT_ERR_BAD_PATH);
+ path = realpath(abspath, NULL);
+ if (path == NULL) {
+ err = got_error_from_errno2("realpath", path);
goto done;
}
- path = normpath;
do {
err = open_repo(repo, path);
if (err == NULL)
else
*repop = repo;
free(abspath);
- free(normpath);
return err;
}